✔ 最佳答案
IP Address Command:
Router(config)# interface ethernet 0(configure IP address)
Router(config-if)# ip address “IP address” “subnet address”
Router(config-if)# no shutdown
Router(config-if)# exit
Router# show interfaces ethernet 0 (verify the setting of IP address)
Router# show ip interface (show all setting of IP address in layer-3 in details)
Router# show ip interface brief (show only the interfaces line state and protocol state are up or down, and also the corresponding ip address)
Router on a Stick:
Router(config)# interface fastethernet 0/0
Router(config-if)# no shutdown
Router(config-if)# exit
Router(config)# interface fastethernet 0/0.10 point (point-to-point serial link)
Or
Router(config)# interface fastethernet 0/0.10 multipoint (routing between multiple VLANs: trunk connection)
Router(config-subif)# encapsulation isl 1 (Cisco ISL with VLAN 1)
Or
Router(config-subif)# encapsulation dot1q (IEEE 802.1q with VLAN 1)
Router(config-subif)# ip address “IP address” “subnet address”
Router(config-subif)# exit
Router(config-if)# ip directed-broadcast (enable forward directed broadcasts)
Router(config-if)# no ip directed-broadcast (disable forward directed broadcasts)
Change the display format of IP Address (every time log into the router):
Router# term ip netmask-format bit-count | decimal | hexadecimal
Change the display format of IP Address (permanent):
Router(config)# line console | auxiliary | vty “line #”
Router(config-line)# ip netmask-format bit-count | decimal | hexadecimal
To define a DNS:
Router(config)# ip name-server “IP address of server” [“2nd server’s IP address…]
Router(config)# no ip domain-lookup (to disable DNS lookup)
Router(config)# show host (to see the DNS entries)
Configuring Static Routes:
Router(config)# ip route “IP Address” “Subnet mask” “interface to exit” [“administrative distance”] [permanent] (permanent will keep the static route in routing table)
To setup default route (it is used to forward the packet if the destination is not known)
Router(config)#: ip route 0.0.0.0.0.0.0.0 “interface to exit” [“administrative distance”] [permanent]
Router(config)# ip classless (define as a variable length subnet mask)
Router Command:
Router(config)# router “Name of the IP routing protocol”
Router(config-router)#(enter the Router Configuration mode)
Router(config-router)# network “IP network #” (defines which interface will be participating in the routing protocol)
Router(config)# router rip (example, configuring IP RIP)
Router(config-router)# network 172.16.0.0 (remember rip and igrp are classful)
Router# show ip protocols (display the IP routing protocols that have been configured and are running on your router)
Router# show ip route (see the list of paths to destination in a routing table)
Router# debug ip rip (see more detailed troubleshooting of IP RIP problem)
Router(config)# router igrp 100 (configuring IP IGRP with autonomous system number 100)
Router(config-router)# network “IP network #”
Router(config-router)# variance “multiplier” (1 for equal-cost path)
Router(config-router )# traffic-share balanced
Or
Router(config-router)# traffic-share min across-interfaces
Router# clear ip route (clear the routing table)
Router# debug ip igrp transactions (see the routing updates receive / send in details)
Router# debug ip igrp events (see the routing updates receive / send in summary)