Professional Documents
Culture Documents
+ a ch IP ca router k cn.
Ngoi ra, trong Static Routing c mt trng hp c bit c gi l Default Route. Cu lnh tng t nh Static Routing nhng a ch mng ch v subnet mask l khng cn bit. c im ca Default Route l: + u tin thp nht, nm cht bng nh tuyn. + Khng cn bit mng ch nm u v subnet mask l g. V d: R1(config)# ip route 0.0.0.0 0.0.0.0 s1/0 hoc R1(config)# ip route 0.0.0.0 0.0.0.0 192.168.1.2
Lab
Gi s ta c m hnh nh hnh trn. nh tuyn 3 router trn bng Static Routing, ta lm nh sau: i vi router R1: (ta dng outbound interface) Router >en Router # config terminal Router (config) # hostname R1 R1 (config) # interface loopback 0 R1 (config-if) # ip address 192.168.1.1 255.255.255.0
R1 (config-if) # exit R1 R1 R1 R1 (config) # interface s1/0 (config-if) # ip address 192.168.12.1 255.255.255.0 (config-if) # no shutdown (config-if) # exit
R1 (config) # ip route 192.168.2.0 255.255.255.0 s1/0 R1 (config) # ip route 192.168.23.0 255.255.255.0 s1/0 R1 (config) # ip route 192.168.3.0 255.255.255.0 s1/0 i vi router R2: (ta dng next hope) Router >en Router # config terminal Router (config) # hostname R2 R2 (config) # interface loopback 0 R2 (config-if) # ip address 192.168.2.1 255.255.255.0 R2 (config-if) # exit R2 R2 R2 R2 R2 R2 R2 R2 (config) # interface s1/0 (config-if) # ip address 192.168.12.2 255.255.255.0 (config-if) # no shutdown (config-if) # exit (config) # interface s1/1 (config-if) # ip address 192.168.23.2 255.255.255.0 (config-if) # no shutdown (config-if) # exit
R2(config) # ip route 192.168.1.0 255.255.255.0 192.168.12.1 R2(config) # ip route 192.168.3.0 255.255.255.0 192.168.23.3
i vi router R3: (ta dng default route) Router >en Router # config terminal Router (config) # hostname R3 R3(config) # interface loopback 0 R3(config-if) # ip address 192.168.3.1 255.255.255.0 R3(config-if) # exit R3(config) # interface s1/0 R3(config-if) # ip address 192.168.23.3 255.255.255.0 R3(config-if) # no shutdown R3(config-if) # exit R3(config) # ip route 0.0.0.0 0.0.0.0 s1/0 Xong vic cu hnh cho 3 router. kim tra cc mng c th thy nhau hay khng,
ta c th dng lnh ping kim tra hoc dng lnh show ip route kim tra bng nh tuyn ca cc router.