思科基础代码学习笔记

配置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

  • 0
    点赞
  • 10
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值