配置ip地址:
configure terminal
interface f0/0
ip address 12.12.12.1 255.255.255.0
no shutdown
end
show ip interface brief
静态路由(每台路由都要配置,有来有回,直连路由不需重复配置):
初始路由:ip route 目的网段 掩码 (出接口)下一跳ip
(配置模式+do)sh ip route
目的路由:ip route 目的网段 掩码 (出接口)下一跳ip
(配置模式+do)sh ip route
ping 目的地址
(只有末节路由可配置默认路由:ip route 0.0.0.0 0.0.0.0 下一跳ip)
动态路由:
router eigrp 编号
network 本身的直连网段 反掩码
no auto-summary
远程登入用户模式(初始模式):
telnet 目的地址
密码
登入特权模式:
enable
密码
设置用户模式密码:
line vty 0 n(线路数n+1)
password 密码
login
设置特权模式密码:
conf t
enable password 密码
设置高级密码:
enable secret 密码(加密等级更高,优先级更高)
dhcp获取ip地址:
路由器部分:
conf t
ip dhcp pool 编号
network 直连网段 掩码
default-router 对应接口地址
电脑部分:
conf t
no ip routing
int 接口
ip add dhcp
no sh