Pages

Showing posts with label ip route. Show all posts
Showing posts with label ip route. Show all posts

Tuesday, January 18, 2011

a few useful show IP command..

sh ip route


R1#sh ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area 
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route


Gateway of last resort is not set


     172.16.0.0/30 is subnetted, 2 subnets
C       172.16.1.0 is directly connected, Serial0/1
C       172.16.2.0 is directly connected, Serial0/0
     10.0.0.0/24 is subnetted, 1 subnets
D       10.1.1.0 [90/2195456] via 172.16.1.2, 00:02:01, Serial0/1
C    192.168.1.0/24 is directly connected, Loopback1

  • type of network ; static, connected
  • or how the router learn it ; EIGRP, OSPF.from which interface it learned

let's be more specific
show ip route [address]

R1#sh ip rou 10.1.1.1
Routing entry for 10.1.1.0/24
  Known via "eigrp 1", distance 90, metric 2195456, type internal
  Redistributing via eigrp 1
  Last update from 172.16.1.2 on Serial0/1, 00:07:16 ago
  Routing Descriptor Blocks:
  * 172.16.1.2, from 172.16.1.2, 00:07:16 ago, via Serial0/1
      Route metric is 2195456, traffic share count is 1
      Total delay is 21000 microseconds, minimum bandwidth is 1544 Kbit
      Reliability 255/255, minimum MTU 1500 bytes
      Loading 1/255, Hops 1

  • how it's learned . ex; EIGRP, static or connected..
  • how long since the route learned, this can be useful when you want to check how long link down, up time.. etc,
  • the bandwidth information are reflected by the value configured on the interface .. what ever value you put, it's gonna show the same in here

show ip route connected
show ip route static

  • issue this two cmd if you want to filter or be more specific on the type of route

show ip route summary

R1#sh ip rou sum
IP routing table name is Default-IP-Routing-Table(0)
IP routing table maximum-paths is 16
Route Source    Networks    Subnets     Overhead    Memory (bytes)
connected       1           2           216         408
static               0           0           0           0
eigrp 1            0           1           72          136
internal            2                                   2312
Total               3           3           288         2856
Removing Queue Size 0

  • this will summarize all you information base on Net, Subnet, Overhead(other memory used) and Memory


Friday, April 9, 2010

3 method configuring default route on hub-spoke network - GNS3

dg

  • ip default-network
  • ip route
  • ip default-gateway
this example we’ll use RIP, you can also use EIGRP but not OSPF
prepare the network
R1
interface FastEthernet0/0
ip address 10.1.1.1 255.255.255.0
duplex auto
speed auto
!
interface Serial0/0
ip address 192.168.1.1 255.255.255.0
clock rate 64000
!
interface Serial0/1
ip address 172.16.1.1 255.255.255.0
clock rate 64000
!
router rip
network 172.16.0.0
network 192.168.1.0

R2
interface Serial0/0
ip address 192.168.1.2 255.255.255.0
!
router rip
network 172.16.0.0
network 192.168.1.0

R3
interface Serial0/0
ip address 172.16.1.2 255.255.255.0
!
router rip
network 172.16.0.0

make sure R1, R2 and R3 learn all the advertised interfaces and RIP working fine by pinging from one to other interfaces
R1>sh ip rou
R    99.0.0.0/8 [120/1] via 192.168.1.2, 00:00:16, Serial0/0
     172.16.0.0/24 is subnetted, 1 subnets
C       172.16.1.0 is directly connected, Serial0/1
     10.0.0.0/24 is subnetted, 1 subnets
C       10.1.1.0 is directly connected, FastEthernet0/0
C    192.168.1.0/24 is directly connected, Serial0/0


R2#show ip route
     99.0.0.0/24 is subnetted, 1 subnets
C       99.99.99.0 is directly connected, Loopback99
R    172.16.0.0/16 [120/1] via 192.168.1.1, 00:00:15, Serial0/0
C    192.168.1.0/24 is directly connected, Serial0/0

R3#sh ip rou
R    99.0.0.0/8 [120/1] via 172.16.1.1, 00:00:21, Serial0/0
     172.16.0.0/24 is subnetted, 1 subnets
C       172.16.1.0 is directly connected, Serial0/0
R    192.168.1.0/24 [120/1] via 172.16.1.1, 00:00:21, Serial0/0

now issue this command on R1
R1(config)#ip default-network 10.0.0.0
*again, remember, this only work on hub spoke network only !!!
now, show ip route on R2 and R3
notice there are default route in the routing table
R2#sh ip route
     99.0.0.0/24 is subnetted, 1 subnets
C       99.99.99.0 is directly connected, Loopback99
R    172.16.0.0/16 [120/1] via 192.168.1.1, 00:00:12, Serial0/0
R    10.0.0.0/8 [120/1] via 192.168.1.1, 00:00:12, Serial0/0
C    192.168.1.0/24 is directly connected, Serial0/0
R*   0.0.0.0/0 [120/1] via 192.168.1.1, 00:00:12, Serial0/0

R3#sh ip route
R    99.0.0.0/8 [120/1] via 172.16.1.1, 00:00:17, Serial0/0
     172.16.0.0/24 is subnetted, 1 subnets
C       172.16.1.0 is directly connected, Serial0/0
R    10.0.0.0/8 [120/1] via 172.16.1.1, 00:00:17, Serial0/0
R    192.168.1.0/24 [120/1] via 172.16.1.1, 00:00:17, Serial0/0
R*   0.0.0.0/0 [120/1] via 172.16.1.1, 00:00:17, Serial0/0

now we'll configure configure static ip route, using this method we need to redistribute the route to R2 and R3 manually
remove default-network and clear the routing table to make sure it's not gonna influence our new conf in any possible way
on R1
R1(config)#no ip default-network 10.0.0.0
on R1, R2 and R3
R1#clear ip route *

issue the static route command on R1 and specified the exit interface
R1(config)#ip route 0.0.0.0 0.0.0.0 fastEthernet 0/0
then redistribute this static route to RIP
R1(config)#router rip
R1(config-router)#redistribute static
show ip route on R2 and R3 should show the default route now
R3#sh ip route
Gateway of last resort is 172.16.1.1 to network 0.0.0.0

R    99.0.0.0/8 [120/1] via 172.16.1.1, 00:00:15, Serial0/0
     172.16.0.0/24 is subnetted, 1 subnets
C       172.16.1.0 is directly connected, Serial0/0
R    10.0.0.0/8 [120/1] via 172.16.1.1, 00:00:15, Serial0/0
R    192.168.1.0/24 [120/1] via 172.16.1.1, 00:00:15, Serial0/0
R*   0.0.0.0/0 [120/1] via 172.16.1.1, 00:00:15, Serial0/0

R2#sh ip route
Gateway of last resort is 192.168.1.1 to network 0.0.0.0

     99.0.0.0/24 is subnetted, 1 subnets
C       99.99.99.0 is directly connected, Loopback99
R    172.16.0.0/16 [120/1] via 192.168.1.1, 00:00:01, Serial0/0
R    10.0.0.0/8 [120/1] via 192.168.1.1, 00:00:01, Serial0/0
C    192.168.1.0/24 is directly connected, Serial0/0
R*   0.0.0.0/0 [120/1] via 192.168.1.1, 00:00:01, Serial0/0
this conf also work with EIGRP, but not with OSPF

another way is to use command ip default-gateway, but you need to turn off ip routing to use this
R3(config)#no ip routing
R3(config)#ip default-gateway 172.16.1.1

R3#sh ip route
Default gateway is 172.16.1.1

Host               Gateway           Last Use    Total Uses  Interface
ICMP redirect cache is empty