cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
484
Views
0
Helpful
3
Replies

default static route and Null 0

mahesh18
Level 6
Level 6

 

Hi Everyone,

Need to clear some doubts  for below setup

 

Switch 3550A is connected to Internet Router and has OSPF nei relationship with it.

3550A#                      sh run int fa0/11
Building configuration...

Current configuration : 272 bytes
!
interface FastEthernet0/11
 description OSPF LAN Connection to 2691 Router Interface Fas 0/1
 no switchport
 ip address 192.168.5.2 255.255.255.254

 

sh ip route shows

3550A#sh ip route


Gateway of last resort is 192.168.5.3 to network 0.0.0.0

O*E2 0.0.0.0/0 [110/1] via 192.168.5.3, 20:39:56, FastEthernet0/11
3550A#

All is working fine.

For testing  purposes i config below static route on 3550A

ip default-network 192.168.1.0
ip route 192.168.1.0 255.255.255.0 Null0

 

After above change

3550A#           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

S*   192.168.1.0/24 is directly connected, Null0
O*E2 0.0.0.0/0 [110/1] via 192.168.5.3, 20:38:38, FastEthernet0/11

 

Now i can not ping to internet as below

3550A#ping 4.2.2.2

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 4.2.2.2, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)

 

When we ping from Switch then source IP is always the Outside interface IP right?

So in this case Switch is using which IP as source?

 Ping to internet is not working as default network is set to 192.168.1.0 and all request goes to this IP and then it goes to

Null interface right?

 

Extended ping works fine as below

3550A#ping
Protocol [ip]:
Target IP address: 4.2.2.2
Repeat count [5]:
Datagram size [100]:
Timeout in seconds [2]:
Extended commands [n]: y
Source address or interface: 192.168.5.2
Type of service [0]:
Set DF bit in IP header? [no]:
Validate reply data? [no]:
Data pattern [0xABCD]:
Loose, Strict, Record, Timestamp, Verbose[none]:
Sweep range of sizes [n]:
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 4.2.2.2, timeout is 2 seconds:
Packet sent with a source address of 192.168.5.2
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 76/79/80 ms

 

Second thing to confirm is this ping works because 192.168.5.2 is directly connected to Internet Router interface?

 

Regards

MAhesh

 

1 Accepted Solution

Accepted Solutions

Hi Mahesh,

That is correct.When you specify the source as 192.168.5.2, it works because that is the outgoing interface that connects to the router.

HTH

Reza

View solution in original post

3 Replies 3

Reza Sharifi
Hall of Fame
Hall of Fame

Hi Mahesh,

When we ping from Switch then source IP is always the Outside interface IP right?

That is correct.  By default it is always the outgoing interface on the device unless you specify it differently.

Ping to internet is not working as default network is set to 192.168.1.0 and all request goes to this IP and then it goes to

Null interface right?

That is correct. Null0 can't be used as next-hop.

Second thing to confirm is this ping works because 192.168.5.2 is directly connected to Internet Router interface?

No, that is because 192.168.5.0/30 is NATed. Remember 192.168.x.x address is a private segment and cannot access the Internet unless NAT is used.

HTH

Reza

 

 

 

 

 

Hi Reza,

For ping which is working i know about NAT part but need to confirm when we specify source as

192.168.5.2 and it works because int fa0/11 is directly connected to Internet router interface fa0/1?

3550----fa0/11----------------fa0/1--router --------fa0/0---------ISP.

 

Regards

MAhesh

Hi Mahesh,

That is correct.When you specify the source as 192.168.5.2, it works because that is the outgoing interface that connects to the router.

HTH

Reza

Review Cisco Networking for a $25 gift card