在放好2个路由器之后,再分别安装上接口,两个一样

再接线如下图


一、使能在主机0远程配置路由器1
路由器1:
Router>enable
Router#configure terminal
Router(config)#interface loopback 0(设置环回地址)
Router(config-if)#ip address 10.1.1.1 255.0.0.0
想让主机0访问路由器1的f0/0端口,则
Router(config-if)#exit
Router(config)#interface f0/0
Router(config-if)#ip address 192.168.0.1 255.255.255.0
Router(config-if)#no shutdown

给主机0配置IP地址,如下

要使主机0通过Telnet访问路由1,则
Router(config-if)#exit
Router(config)#line vty 0 4
Router(config-line)#password 123(设置密码)
Router(config-line)#login(登陆)
在主机0命令提示符中输入
PC>telnet 10.1.1.1

输入123,回车

此时如果敲了第一个password后,再输enable,显示no password net,则:
Router(config-line)#exit
Router(config)#enable password 1234
再打开主机0的命令提示符,输入刚才设置的第二个密码1234

然后就可以在主机0上面远程配置路由器1,后面的命令就相当于在路由器1上面操作
二、使主机1能远程访问路由器0
路由器0:
Router>enable
Router#configure terminal
Router(config)#interface loopback 0(设置环回地址)
Router(config-if)#ip address 10.1.1.1 255.0.0.0
想让主机4访问路由器1的eth1/0端口,则
Router(config-if)#exit
Router(config)#interface ethernet 1/0
Router(config-if)#ip address 192.168.2.1 255.255.255.0
Router(config-if)#no shutdown

三、让路由器1和路由器0相连
路由器1:
Router>enable
Password:123
Password:1234
Router#configure terminal
Router(config)#interface f0/1
Router(config-if)#ip address 192.168.1.1 255.255.255.0
Router(config-if)#no shutdown
路由器0:
Router>enable
Router#configure terminal
Router(config)#interface loopback 1
Router(config-if)#ip address 10.1.1.1 255.0.0.0
Router(config-if)#exit
Router(config)#interface fastEthernet 0/0(和interface f0/0 一样)
Router(config-if)#ip address 192.168.1.2 255.255.255.0
Router(config-if)#no shutdown

网友评论