HQ>en
創(chuàng)新互聯(lián)建站長期為上千客戶提供的網(wǎng)站建設(shè)服務,團隊從業(yè)經(jīng)驗10年,關(guān)注不同地域、不同群體,并針對不同對象提供差異化的產(chǎn)品和服務;打造開放共贏平臺,與合作伙伴共同營造健康的互聯(lián)網(wǎng)生態(tài)環(huán)境。為儋州企業(yè)提供專業(yè)的成都網(wǎng)站設(shè)計、成都網(wǎng)站建設(shè),儋州網(wǎng)站改版等技術(shù)服務。擁有十年豐富建站經(jīng)驗和眾多成功案例,為您定制開發(fā)。HQ>enable
HQ#conf t
Enter configuration commands, one per line. End with CNTL/Z.
HQ(config)#int e0/0
HQ(config-if)#no shut
HQ(config-if)#no shutdown
HQ(config-if)#ip add
HQ(config-if)#ip address 172.16.1.100 255.255.255.248
HQ(config-if)#exi
HQ(config)#int e0/1
HQ(config-if)#no shu
HQ(config-if)#no shutdown
HQ(config-if)#ip ad
HQ(config-if)#ip add
HQ(config-if)#ip address 192.168.1.2 255.255.255.252
HQ(config-if)#exi
HQ(config)#exi
*Sep 14 16:38:30.401: %SYS-5-CONFIG_I: Configured from console by console
HQ#show ip route //顯示路由表
Codes: L - local, 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, H - NHRP, l - LISP
a - application route
+ - replicated route, % - next hop override
Gateway of last resort is not set
172.16.0.0/16 is variably subnetted, 2 subnets, 2 masks
C 172.16.1.96/29 is directly connected, Ethernet0/0
L 172.16.1.100/32 is directly connected, Ethernet0/0
192.168.1.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.1.0/30 is directly connected, Ethernet0/1
L 192.168.1.2/32 is directly connected, Ethernet0/1
HQ#conf t
Enter configuration commands, one per line. End with CNTL/Z.
HQ(config)#ip route 10.1.10.16 255.255.255.240 e0/1 //將10.1.10.16放入路由表,通過e0/1通信
HQ(config)#exi
HQ#
*Sep 14 16:59:32.032: %SYS-5-CONFIG_I: Configured from console by console
HQ#ping 10.1.10.23
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.10.23, timeout is 2 seconds:
.!!!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 1/1/1 ms //ping通目標地址
HQ#show ip route //顯示修改過的路由表
Codes: L - local, 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, H - NHRP, l - LISP
a - application route
+ - replicated route, % - next hop override
Gateway of last resort is not set
10.0.0.0/28 is subnetted, 1 subnets
S 10.1.10.16 is directly connected, Ethernet0/1
172.16.0.0/16 is variably subnetted, 2 subnets, 2 masks
C 172.16.1.96/29 is directly connected, Ethernet0/0
L 172.16.1.100/32 is directly connected, Ethernet0/0
192.168.1.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.1.0/30 is directly connected, Ethernet0/1
L 192.168.1.2/32 is directly connected, Ethernet0/1
HQ#
在另一臺路由器Branch上進行相同配置,即可實現(xiàn)互相訪問,注意掩碼
相關(guān)設(shè)置:
HQ: e0/1 192.168.1.2 255.255.255.252
e0/0 172.16.1.100 255.255.255.248
Branch: e0/1 192.168.1.1 255.255.255.0
e0/0 10.1.10.23 255.255.255.240
重要命令:show ip route 顯示路由表
ip route + ip地址 +掩碼 手工設(shè)置靜態(tài)路由表
注:當使用 ip route + ip地址 +掩碼 命令手工設(shè)置靜態(tài)路由表時,此處ip地址應寫箭頭處地址,而非local ip地址。
另外有需要云服務器可以了解下創(chuàng)新互聯(lián)scvps.cn,海內(nèi)外云服務器15元起步,三天無理由+7*72小時售后在線,公司持有idc許可證,提供“云服務器、裸金屬服務器、高防服務器、香港服務器、美國服務器、虛擬主機、免備案服務器”等云主機租用服務以及企業(yè)上云的綜合解決方案,具有“安全穩(wěn)定、簡單易用、服務可用性高、性價比高”等特點與優(yōu)勢,專為企業(yè)上云打造定制,能夠滿足用戶豐富、多元化的應用場景需求。