大家都知道,從一個(gè)房間走到另一個(gè)房間,必然要經(jīng)過一扇門。同樣,從一個(gè)網(wǎng)絡(luò)向另一個(gè)網(wǎng)絡(luò)發(fā)送信息,也必須經(jīng)過一道“關(guān)口”,這道關(guān)口就是網(wǎng)關(guān)。
許多有關(guān)TCP/IP的文獻(xiàn)曾經(jīng)把網(wǎng)絡(luò)層使用的路由器稱為網(wǎng)關(guān),在今天很多局域網(wǎng)采用都是路由來接入網(wǎng)絡(luò),因此通常指的網(wǎng)關(guān)就是路由器的IP!
我們打開路由器的CLL來對(duì)路由器的接口進(jìn)行ip配置
在全局配置模式進(jìn)入到路由器接口
Router(config)#interface 接口 n/n(in 接口?n/n)
?在接口模式下添加該接口的ip
Router(config-if)#ip address ip地址 子網(wǎng)掩碼(ip add ip地址 子網(wǎng)掩碼)
打開路由器接口開關(guān)
Router(config-if)#no shutdown(no sh)
Router(config-if)#
%LINK-5-CHANGED: Interface 接口0/0, changed state to up
現(xiàn)在我們完成路由器1的兩個(gè)接口的ip設(shè)置,實(shí)現(xiàn)PC0與PC1的通信。
對(duì)PC1進(jìn)行配置IP為192.168.58.2,網(wǎng)關(guān)為192.168.58.1,子網(wǎng)掩碼為255.255.255.0。
?
對(duì)PC0進(jìn)行配置IP為192.168.59.2,網(wǎng)關(guān)為192.168.59.1,子網(wǎng)掩碼為255.255.255.0。
?
現(xiàn)在對(duì)路由器1的Fa0/0和Fa0/1的IP進(jìn)行配置
進(jìn)入到全局配置模式
Router>enable
Router#configure terminal
Router(config)#
進(jìn)入Fa0/0端口進(jìn)行IP配置。
Router(config)#interface fastEthernet 0/0
Router(config-if)#ip address 192.168.59.1 255.255.255.0
Router(config-if)#no shutdown
Router(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
進(jìn)入到Fa0/1端口進(jìn)行IP配置。
Router(config-if)#interface fastEthernet 0/1
Router(config-if)#ip address 192.168.58.1 255.255.255.0
Router(config-if)#no shutdown
Router(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up
我們發(fā)現(xiàn)所有接口已經(jīng)變?yōu)榫G色,說明理論上已經(jīng)完成了物理通路。
我們打開PC1的命令行界面對(duì)PC0進(jìn)行ping。
得到回應(yīng)證明配置正確,實(shí)現(xiàn)了PC0到PC1的通信。?文章來源:http://www.zghlxwxcb.cn/news/detail-428744.html
?本文章為自己學(xué)習(xí)總結(jié),僅供學(xué)習(xí)參考,如有錯(cuò)誤請(qǐng)指出,會(huì)進(jìn)行改正?。?!文章來源地址http://www.zghlxwxcb.cn/news/detail-428744.html
到了這里,關(guān)于Cisco Packet Tracer路由器ip簡單配置(網(wǎng)關(guān))的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!