路由交换(packet tracer)操作命令

DHCP

ip dhcp pool 1

network 192.168.200.0 255.255.255.192

de 192.168.200.62

网关助手

先进到连接主机的端口

ip helper-address 写的服务器所在ip接口地址

RIP

router rip

network 192.168.48.0

no auto 关闭自动汇总
version 2 版本号

OSPF

基本过程

进入进程

router ospf 1(简写 ro o 1)

配置ospf

network +网络+掩码反码+区域号(network可简写为net)

例:net 192.168.151.0 0.0.0.255 area 0

配置路由汇总

进入进程

router ospf 1

area 号 网段 掩码

例:area 2 range 192.168.148.0 255.255.255.0

区域认证

进入进程

router ospf 1

启动区域认证

area 0 authentication message-digest

进入对应端口

interface ethernet 1

配置密码

ip ospf message-digest-key 1 md5 cisco

链路认证

进入对应端口

int f 0/1

启用加密验证

ip ospf authentication message-digest

配置密码

ip ospf message-digest-key 1 md5 weizihe

EIGRP

路由

首先进到全局配置模式

router eigrp 1

network 172.16.0.0 0.0.0.255

network 192.168.0.0 0.0.0.255

子网需要反码

认证

首先进到全局配置模式

key chain cisco

key 1

key -string weizihe

interface f2/0

ip authentication mode eighp 1 md5

ip authentication key-chain eigrp 1 weizihe

汇总

首先进到全局配置模式

router eigrp 1

no auto-summary

exit

interface e0/0

ip summary-address eigrp 1 192.168.0.0 255.255.0.0

负载均衡

int g0/0

bw 95000

exit

router eigrp 1

variance 2

Vlan

0.划分网络,配好pc

左下角为/26

右上角为/25

1.创建Vlan

全局模式

vlan 2

2.将vlan与端口对应

全局模式

int f0/1

(int range f0/2-f0/5)

switchport mode access 设置端口为访问模式

switchport access vlan 2对应

3.设置干道模式

将与交换机或路由器相接的端口设置为干道模式

端口模式

switchport mode trunk

4.配置路由器端口

全局模式

int fastethernet 0/0.2 进入端口

encapsulation dotlq 2 封装

ip address 192.168.3.1 255.255.255.0

no shutdown

5.三层交换机特殊

全局模式

ip routing 启用路由功能

no switchport 关闭交换功能

ACL

标准ACL

1.acc 1 deny 192.168.200.0 0.0.0.255 定义第1组:拒绝此网段访问

2.acc 1 permit any 定义第1组:允许其他网段访问

3.int f0/0.1 进入对应端口

4.ip access-group 1 out 出口使用第1组访问方法

扩展ACL

1.access -list 100 deny tcp 192.168.200.0 0.0.0.63 host 192.168.205.0 eq 80/www

定义第100组:不允许 192.168.200.0网段用tcp访问192.168.205.0网段的80/www服务

2.access -list 100 permit tcp any any

3.access -list 100 permit ip any any

定义第100组:允许其他网段使用tcp与ip

4.int f0/6进入对应接口

5.ip access-group 100 in 入口使用第100组访问方法

NAT

检测:debug ip nat

静态NAT

1.配置静态NAT映射

ip nat inside source static 192.168.1.1 202.96.1.3

2.配置NAT内部接口

int f0/1

ip nat inside

3.配置NAT外部接口

int f1/0

ip nat outside

动态NAT

1.配置ACL组

acc 1 per 192.168.48.0 0.0.0.255

2.配置动态NAT转换的地址池

ip nat pool wzh 192.168.50.4 192.168.50.4netmask 255.255.255.0

3.配置PAT

ip nat inside source list 1 pool wzh overload

4.配置NAT内外部接口

示例请看静态第三条

PPP

进入对应串口

int s1/0

封装ppp

encapsulation ppp

PAP

1.设定用户密码

username 名字+对端号 pass cisco+对端号

2.启用pap

ppp authen pap

3.pap认证

ppp pap sent-username 名字+本端号 pass cisco+本端号

chap(先改好路由器名)

1.启用chap

ppp authen chap

2.chap认证

username 对端路由器名 pass 名字

帧中继

云端配置

DLCI:102(从1口到2口)

Name:1-2

frame relay 将DLCI两两对应

路由器配置

1.进入串口

int s2/0

2.帧中继封装

encapsulation frame-relay

3.取消动态帧中继

no frame-relay inverse-arp

4.配置静态帧中继

frame-relay map ip (对端ip) (本地dlci) b

网关冗余

路由器端口ip先设置为该网段内其他合法ip

int f/0/1.1

ip add 192.168.200.125 255.255.255.0

创建组,添ip

satndby 1 ip 192.168.200.126

优先级

standby 1 priority 200

抢占模式

standby 1 preempt

路由重发布

rip与eigrp

进入rip

rou r

redistribute eigrp 1 metric 5

rou e 1

redistribute rip metric 10000 1 255 10 10000

ospf与eigrp

rou o 100

redistribute eigrp 1 metric 100 metric-type 1 subnets

rou e 1

redistribute ospf met 10000 1 255 10 10000

  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值