Professional Windows Server 1002003 Security A Technical Reference [Electronic resources]

Roberta Bragg

نسخه متنی -صفحه : 415/ 353
نمايش فراداده

netsh/Routing Context

Configures a router (a multihomed computer with the Routing and Remote Access Service installed and enabled).

Subcontexts

IP

autodhcp

dnsproxy

IGMP

NAT

OSPF

Relay

RIP

IPX

NETBIOS

RIP

sap

Only commands for the IP subcontext are covered in this section. For a list of commands in the IPX subcontext, switch to that subcontext and type help.

Commands

dump

Dumps the configuration of the router as a series of NetShell commands.

ip

Switches to IP subcontext. The commands available in this subcontext are listed in Table 5-13. Within the IP subcontext are the following deeper subcontexts: autodhcp, dnsproxy, IGMP, NAT, OSPF, Relay, and RIP. The commands for these subcontexts are listed in Table 5-14 through Table 5-20.

ipx

Switches to IPX subcontext.

reset

Resets the IP address configuration of the router to a clean state.

show helper

Details IP and IPX Helper DLLs for the routing context.

Table 5-13. Commands available in Routing IP subcontext

Command

Option

Description

add/delete/ set/show

interface

Adds/deletes/specifies/displays routing settings

filter

Adds/deletes/specifies/displays packet filters

rtmroute

Adds/deletes/specifies/displays nonpersistent routes

persistentroute

Adds/deletes/specifies/displays persistent routes

preference- forprotocol

Adds/deletes/specifies/displays preference level

scope

Adds/deletes/specifies/displays multicast scope

add/delete/ show

boundary

Adds/deletes/displays multicast boundary settings

add/set

ipiptunnel

Adds/specifies IP-in-IP interface

autodhcp

Switches to routing IP autodhcp subcontext (see Table 5-14)

dnsproxy

Switches to routing IP dnsproxy subcontext (see Table 5-15)

igmp

Switches to routing IP IGMP subcontext (see Table 5-16)

nat

Switches to routing IP NAT subcontext (see Table 5-17)

ospf

Switches to routing IP OSPF subcontext (see Table 5-18)

relay

Switches to routing IP relay subcontext (see Table 5-19)

rip

Switches to routing IP RIP subcontext (see Table 5-20)

set/show

loglevel

Specifies/displays global logging level

show

helper

Lists all netsh subcontexts for IP

protocol

Lists all running IP routing protocols

mfe

Shows multicast forwarding entries

mfestats

Displays entry statistics for multicast forwarding

boundarystats

Lists all IP multicast boundaries

rtmdestinations

Lists destinations in routing table

rtmroutes

Lists routes in routing table

Table 5-14. Commands available in Routing IP autodhcp subcontext

Command

Option

Description

set/show

global

Specifies/displays global DHCP allocator settings

interface

Specifies/displays DHCP allocator settings for specified interface

add/delete

exclusion

Adds/deletes an exclusion

Table 5-15. Commands available in Routing IP dnsproxy subcontext

Command

Option

Description

set/show

global

Specifies/displays global DNS proxy settings

interface

Specifies/displays DNS proxy settings for specified interface

Table 5-16. Commands available in Routing IP IGMP subcontext

Command

Option

Description

set/show

global

Specifies/displays IGMP global settings

add/delete/ set/show

interface

Adds/deletes/specifies/displays IGMP settings on specified interface

add/delete

staticgroup

Adds/deletes static multicast group

show

grouptable

Displays IGMP host-groups table

ifstats

Displays IGMP statistics

iftable

Displays IGMP host groups per interface

proxygrouptable

Displays IGMP group table for proxy interface

rasgrouptable

Displays IGMP group table for internal interface used by RAS server

Table 5-17. Commands available in Routing IP NAT subcontext

Command

Options

Description

set/show

global

Specifies/displays global NAT settings

add/delete/ set/show

interface

Adds/deletes/specifies/displays NAT settings for specified interface

add/delete

addressrange

Adds/deletes address range for public address pool

addressmapping

Adds/deletes NAT address mapping

portmapping

Adds/deletes NAT port mapping

Table 5-18. Commands available in Routing IP OSPF subcontext

Command

Option

Description

set/show

global

Specifies/displays global OSPF settings

add/delete/ set/show

interface

Adds/deletes/specifies/displays OSPF settings for specified interface

area

Adds/deletes/specifies/displays an area

virtif

Adds/deletes/specifies/displays a virtual interface

add/delete/ show

range

Adds/deletes/specifies/displays a range for an area

neighbor

Adds/deletes/specifies/displays a neighbor

protofilter

Adds/deletes/specifies/displays routing information sources for external routes

routefilter

Adds/deletes/specifies/displays route filtering for external routes

show

areastats

Displays area statistics

lsdb

Displays link-state database

virtifstats

Displays virtual-link statistics

Table 5-19. Commands available in Routing IP Relay subcontext

Command

Option

Description

set

global

Specifies global settings for DHCP relay agent

add/delete/set

interface

Adds/deletes/specifies DHCP relay agent settings

add/delete

dhcpserver

Adds/deletes IP address for DHCP server

show

ifbinding

Displays bindings

ifconfig

Displays DHCP relay agent settings

ifstats

Displays statistics

Table 5-20. Commands available in Routing IP RIP subcontext

Command

Option

Description

set/show

flags

Specifies/displays advanced settings

global

Specifies/displays global settings

add/delete/ set/show

interface

Adds/deletes/specifies/displays settings

add/delete

peerfilter

Adds/deletes a peer filter

acceptfilter

Adds/deletes a route filter to/from list of accepted routes

announcefilter

Adds/deletes a route filter to/from list of announced routes

add/delete/ show

neighbor

Adds/deletes/displays a neighbor

show

globalstats

Displays global settings

ifbinding

Displays bindings

ifstats

Displays statistics

Examples

Reset routing tables in router to clean configuration:

C:\>netsh
netsh>routing
routing>reset
routing>

Switch to IP subcontext and display routing table:

routing>ip
routing ip>show rtmroutes
Prefix  Protocol  Prf  Met  Gateway  Vw  Interface
--------------------------------------------------
0.0.0.0/0       NetMgmt  10    1  172.16.11.196  UM  
Local Area Connection
127.0.0.0/8      Local    1    1  127.0.0.1      U   
Loopback
127.0.0.1/32     Local    1    1  127.0.0.1      U   
Loopback
172.16.11.0/24     Local  1    1  172.16.11.104  UM  
Local Area Connection
172.16.11.0/24     Local  1    1  172.16.11.105  UM  
Local Area Connection
172.16.11.104/32   Local  1    1  127.0.0.1       U   
Loopback
172.16.11.105/32   Local  1    1  127.0.0.1       U   
Loopback
172.16.255.255/32  Local  1    1  172.16.11.104   UM  
Local Area Connection
172.16.255.255/32  Local  1    1  172.16.11.105   UM 
Local Area Connection
224.0.0.0/4        Local  1    1  172.16.11.104   U   
Local Area Connection
224.0.0.0/4        Local  1    1  172.16.11.105   U   
Local Area Connection
255.255.255.255/32 Local  1    1  172.16.11.104   U   
Local Area Connection
255.255.255.255/32 Local  1    1  172.16.11.105   U  
Local Area Connection

Show IP protocols used:

routing ip>show protocol
Type        Vendor        Protocol
-----------------------------------------------------
General     -             Protocol Priority
General     -             Multicast Boundaries
General     -             Global Info
Multicast   Microsoft     IGMP
Unicast     MS-0000       DHCP

Switch to Relay subcontext, and show DHCP Relay global settings:

routing ip>relay
routing ip relay>show global
DHCP Relay Global Configuration Information
------------------------------------------------------
Logging Level                       : Errors Only
Max Receive Queue Size              : 1048576
Server Count                        : 0

See Also

Routing and

Remote Access