路由(拓扑网络)复习文档

一、以太网

  1. vlan间的通信

(1)、单臂路由

 命令:interface GigabitEthernet0/0/1.10

dot1q termination vid 10

   ip address 10.103.1.1 255.255.255.0

 arp broadcast enable

(2)、三层交换

命令:int  Vlanif  (vlan-id)  ----只能加一个vlan

      ip  addr  IP 掩码

(3)、路由器

          两个接口做网关

  1. 链路聚合

(1)、手工

命令:int  eth- turnk  1

      trunkport GigabitEthernet 0/0/1

(2)、静态

命令:mode lacp-static

    int  eth- turnk  1

    trunkport GigabitEthernet 0/0/1

(3)、lacp

                                                                                                                    

命令:mode  lacp-static

        int  eth- turnk  1

    trunkport  GigabitEthernet 0/0/1

LACP接口优先级:

int  g0/0/0

      lacp  priority 优先级数

最大活动接口数(只有lacp支持):

      int  eth-trunk  1

      max  active- linknumber  接口数

最小活动接口数(都支持):

      int  eth-trunk  1

      least  active-linknumber  接口数

  1. STP:生成树

(1)、STP

开启stp:stp  mode  stp   

设置根桥:stp  root  primry

设置优先级:stp  primry  4096

设置路径开销:stp  cost  50000

      查看信息:dis  stp

      查看状态信息:dis  stp  brief

   (2)、RSTP

      开启:stp  mode  rstp

      设置边缘端口(连PC机):stp  edged-port  enable

二、路由

  1. 静态

(1)、默认路由 

命令:ip  router-static  0.0.0.0 0 下一跳

下发:display ip interface brief

(2)、静态路由

  命令:ip  router-static  目标网段 反掩码 下一跳

2、动态协议

命令:ospf 1

      area 0

         network 自己拥有的网段

三、广播域

  1. ppp

(1)、pap

  主认证方:aaa

            local-user  swx  p  c  123456

            local-user  swx  s  ppp

            int  s4/0/0

            ppp  aut  pap

被认证方:int  s4/0/0

                     ppp  pap  local-user 用户名 password  cipher  密码

(2)、chap

  主认证方:aaa

            local-user  swx  password  cipher  123456

            local-user  swx  service-type  ppp

            int  s4/0/0

            ppp  aut 

  被认证方:int  s4/0/0

            ppp  chap  user  swx         

  ppp  chap  password  cipher  123456

(3)、PPPoE

  1. ACL

(1)、基础:2000—2999

   命令:acl  2000

         rule  5  deny  source  被禁的网段  反掩码

         rule  10  permit  source  允许的网段  反掩码

(2)、高级:3000---3999

参数protocol为IP:

     acl  3000

     rule  deny  ip  source  禁止网段 反掩码destination 目的地址 反掩码

参数protocol为TCP:

     acl  3001

     rule deny ip source 禁止网段 反掩码 destination 目的地址 反掩码

3、NAT

(1)、静态

    系统视图:

          int  g0/0/0  nat  static  global  公网地址  inside  私有地址

(2)、动态(基于地址池)

    创建地址池:

nat  address-group  1 10.103.30.10  10.103.30.20

做acl:

acl  number  2000 

 rule  5  deny  source  10.103.1.0  0.0.0.255 

 rule  15  permit

       在接口加入nat :

nat  outbound  2000  address-group  1  no-pat

(3)、端口

  在接口里的命令改为:

nat  outbound  2000

(4)、服务

     HTTP服务:

          int  g0/0/0 

          nat  server  protocol  tcp  global 公有地址 www  inside 私有地址www

(5)、EASYIP

    

四、拓展

1、dhcp

(1)、基于接口

(2)、基于全局

2、IPV6

 

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值