R1#
R1#show ip route I must see only 2 connected network
R1#show ip routeCodes: C – connected, S – static, I – IGRP, 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, E – EGP
i – IS-IS, 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
10.0.0.0/24 is subnetted, 1 subnets
C 10.10.10.0 is directly connected, FastEthernet0/0
30.0.0.0/30 is subnetted, 1 subnets
C 30.30.30.4 is directly connected, Serial0/3/0
R1#
As we see the network 20.20.20.0/24 is not there
I can do in two ways:
- Static routing
- Dynamic routing
RIP
OSPF
EIGRP
v Now we will do the static route
Hint: you need to put the destination network inside my routing table
Do as follow:
R1#config t
R1(config)#ip route 20.20.20.0 ? 255.255.255.0 ? 30.30.30.6
destination Subnet next hop ip address
On R2 you do same concept but reverse:
R2#config t
(config )#ip route 10.10.10.0 255.255.255.0 ? s0/3/0
Destination mask (your own inter)
Here is my config for R1:
R1#config t
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)#ip route ?
A.B.C.D Destination prefix
R1(config)#ip route 20.20.20.0 ?
A.B.C.D Destination prefix mask
R1(config)#ip route 20.20.20.0 255.255.255.0 ?
A.B.C.D Forwarding router’s address
Ethernet IEEE 802.3
FastEthernet FastEthernet IEEE 802.3
GigabitEthernet GigabitEthernet IEEE 802.3z
Loopback Loopback interface
Null Null interface
Serial Serial
Vlan Catalyst Vlans
R1(config)#ip route 20.20.20.0 255.255.255.0 30.30.30.6 ?
<1-255> Distance metric for this route
<cr>
R1(config)#ip route 20.20.20.0 255.255.255.0 30.30.30.6
R1(config)#
Here is my show run:
R1#show run
ip route 20.20.20.0 255.255.255.0 30.30.30.6
Now I will do at R2 but i use my own interface:
Remember ping is:
Echo
and echo reply it must go and come back
Here is my config for R2
r2#show ip route
Codes: C – connected, S – static, I – IGRP, 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, E – EGP
i – IS-IS, 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
20.0.0.0/24 is subnetted, 1 subnets
C 20.20.20.0 is directly connected, FastEthernet0/0
30.0.0.0/30 is subnetted, 1 subnets
C 30.30.30.4 is directly connected, Serial0/3/0
r2#config t
Enter configuration commands, one per line. End with CNTL/Z.
r2(config)#ip route ?
A.B.C.D Destination prefix
r2(config)#ip route 10.10.10.0 ?
A.B.C.D Destination prefix mask
r2(config)#ip route 10.10.10.0 255.255.255.0 ?
A.B.C.D Forwarding router’s address
Ethernet IEEE 802.3
FastEthernet FastEthernet IEEE 802.3
GigabitEthernet GigabitEthernet IEEE 802.3z
Loopback Loopback interface
Null Null interface
Serial Serial
Vlan Catalyst Vlans
r2(config)#ip route 10.10.10.0 255.255.255.0 s0/3/0
Here is my changed:
r2#show ip route
Codes: C – connected, S – static, I – IGRP, 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, E – EGP
i – IS-IS, 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
10.0.0.0/24 is subnetted, 1 subnets
S 10.10.10.0 is directly connected, Serial0/3/0
20.0.0.0/24 is subnetted, 1 subnets
C 20.20.20.0 is directly connected, FastEthernet0/0
30.0.0.0/30 is subnetted, 1 subnets
C 30.30.30.4 is directly connected, Serial0/3/0
Now I should be able to ping from Pc1 to pc4:
PC>ping 20.20.20.4
Pinging 20.20.20.4 with 32 bytes of data:
Reply from 20.20.20.4: bytes=32 time=141ms TTL=126
Reply from 20.20.20.4: bytes=32 time=156ms TTL=126
Reply from 20.20.20.4: bytes=32 time=140ms TTL=126
Reply from 20.20.20.4: bytes=32 time=140ms TTL=126
Ping statistics for 20.20.20.4:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 140ms, Maximum = 156ms, Average = 144ms
In order pc1=10.10.10.1 be able ping 20.20.20.4 ; the network
20.20.20.0/24 must be inside the routing tables; if it is not
i can put there in different way