Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

unable ping

Status
Not open for further replies.

tming

Technical User
Dec 19, 2001
40
HK
I have a router with two interface.
I have configed ip address on the interfaces
e0/0 10.1.1.1/24
e0/1 172.16.1.2/24

I also enable ospf and set the network
network 10.1.1.0 0.0.0.255 area 1
network 172.16.1.0 0.0.0.255 area 1

However, a pc with ip with 10.1.1.2 connected to e0/0 does not ping the ip 172.16.1.2.(the pc can ping 10.1.1.1)

Is there any things i forget to do?
Anyone can help?
 
If it's as simple as your current network topology (i.e. 1 router and 2 subnets), then you don't even need any dynamic routing protocols like OSPF or EIGRP, and even don't need any static routes.

The most probable reason is the default gateway settings in your PCs. For PCs in the subnet 10.1.1.0/24, you need to set the default gateway to 10.1.1.1. For PCs in the subnet 172.16.1.0/24, you need to set the default gateway to 172.16.1.2.
 
Thank you
I can ping it now
 
Now i have one more router B with ip 172.16.1.1/24 connected to the 172.16.1.2/24.

The router also enable ospf.

Why the pc still cannot ping 172.16.1.1
 
If you just have 1 area, use area 0.

Also do a "show ip route" in Router B and check if it has routes to 10.1.1.0/24 and/or a default route 0.0.0.0/0 with the next hop as Router A's int e0/1 IP address (172.16.1.2/24).
 
Thanks, i can see the ospf entry in route table.

What is the different between area 0 and area 1.
If i have three router A,B,C.
The connection is A > B > C.
What is the default gateway of B.(point to A or C)?
 
Area 0 is the backbone area in OSPF and it's a must. For more information regarding areas, you can read this:


Default gateway is the gateway of last resort. It means that if there's no route to the destination in the routing table, the router will forward the packet to the next hop or the outgoing interface specified in the default route setting.

Normally it's used to forward the traffic towards the Internet since it's not practical to install the whole world into the routing table of your router. So normally you'll have internal networks in your routing table, and a default route to your ISP or another router which has default route towards the Internet so that if you want to forward packets to networks inside the Internet (i.e. networks not in the routing table), you'll use the default gateway.

So in your case, if C is connected to the Internet, then the default gateway of A should be B, and default gateway of B should be C.

If B is connected to the Internet, then default gateway of A and C should be B.

If you are running OSPF, you can also propagate the default route to other routers. The commands vary according to the area type where the default route is injected into. Read the following links about this:

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top