我们连接计算机和路由器,以及路由器和外网接口 注意级联线和直通线的用法!! 首先确定f0/0与f0/1哪个是外网接口 哪个是内网接口 基本路由器配置命令 1.配置f0/0和f0/1的ip地址 Router>en 进入 Password: 输入密码 输入后看不见 Router#config t 进入特权配置模式 Enter configuration commands, one per line. End with CNTL/Z. Router(config)#interface f0/0 进入f0/0接口 Router(config-if)#no shut 激活 f0/0接口 Router(config-if)#ip address 172.16.0.246 255.255.255.0 配置IP地址 Router(config-if)#exit 退出 Router(config)#interface f0/1 进入f0/1接口 Router(config-if)#ip address 192.168.0.1 255.255.255.0 配置IP地址 Router(config-if)#no shut 激活 f0/1接口 Router(config-if)#exit 退出 Router(config)#exit 退出 Router# 00:58:42: %SYS-5-CONFIG_I: Configured from console by console Router#show run 查看运行状态 Building configuration... ========================================================================== Current configuration : 850 bytes ! version 12.2 service timestamps debug uptime service timestamps log uptime no service password-encryption ! hostname Router ! logging console notifications enable password cheng ! ip subnet-zero ! ! ! ip inspect audit-trail ip audit notify log ip audit po max-events 100 ! ! ! ! interface FastEthernet0/0 -------------------------------------- ip address 172.16.0.246 255.255.255.0 duplex auto speed auto ! interface FastEthernet0/1 ip address 192.168.0.1 255.255.255.0 duplex auto speed auto ! interface Ethernet1/0 no ip address 注意每次查看的这些不同之处 ip broadcast-address 0.0.0.0 shutdown half-duplex ! ip classless ip http server ip pim bidir-enable ! logging facility local3 logging 172.18.1.3 tacacs-server host 172.18.1.2 ! line con 0 line aux 0 line vty 0 4 login ! -------------------------------------...