ensp学习第二弹ipv4


配置的示例图
ensp截图
第一步进行改名
sysname R1
注意这个要在那个系统视图下进行改名操作
针对于个个端口进行IP 分配

interface GigabitEthernet 0/0/1    
 ip address 10.0.13.1 24

个个端口如果配置的灭有错误,那么用ping 10.0.12.2去ping其他的路由器是可以访问的到的
下面进行loopBack0

interface LoopBack0  
ip address  10.0.1.1

则会个设置完之后通过 ping -a是不能够ping通的只要是loopback接口是属于折别上的一个逻辑接口,物理上不存在,要关闭时要手动关闭
当三个loopback0接口配置完成之后, 要使用

ip route-static 10.0.1.1 32 10.0.12.2

前面是出去的接口后面是进去的接口
还可以设置R1从R3有一跳到R2

[R1]ip route-static 10.0.1.2 32 10.0.13.3 perference 100
[R2]ip route-static 10.0.1.1 32 10.0.23.3 perference 100

还可以配置默认路由到R2

ip route-static 0.0.0.0 0 10.0.12.2

要注意他这个不再是255.255.255.255 即32 而是0.0.0.0 即0
在关闭端口之后该条线的等于断开 进入端口号

shutdown
undo shutdown

下面附上老师在晚上讲的代码全部

配置参考

R1的配置

#

sysname R1

#

interface GigabitEthernet0/0/1

ip address 10.0.13.1 255.255.255.0

#

interface GigabitEthernet0/0/3

ip address 10.0.12.1 255.255.255.0

#

interface LoopBack0

ip address 10.0.1.1 255.255.255.255

#

ip route-static 0.0.0.0 0.0.0.0 10.0.12.2

ip route-static 10.0.1.3 255.255.255.255 10.0.13.3

# 

return

R2的配置

#

sysname R2

#

interface GigabitEthernet0/0/3

ip address 10.0.12.2 255.255.255.0 

#

interface GigabitEthernet0/0/4

ip address 10.0.23.2 255.255.255.0 

#

interface LoopBack0

ip address 10.0.1.2 255.255.255.255

#

ip route-static 10.0.1.1 255.255.255.255 10.0.12.1

ip route-static 10.0.1.1 255.255.255.255 10.0.23.3 preference 100

ip route-static 10.0.1.3 255.255.255.255 10.0.23.3

#

return

R3的配置

#

sysname R3

#

interface GigabitEthernet0/0/1

ip address 10.0.13.3 255.255.255.0

#

interface GigabitEthernet00/3

ip address 10.0.23.3 255.255.255.0 

#

interface LoopBack0

ip address 10.0.1.3 255.255.255.255

#

ip route-static 10.0.1.1 255.255.255.255 10.0.13.1

ip route-static 10.0.1.2 255.255.255.255 10.0.23.2

#

return

文章作者: 毛豆不逗比
版权声明: 本博客所有文章除特別声明外,均采用 CC BY 4.0 许可协议。转载请注明来源 毛豆不逗比 !
  目录
{% include '_third-party/exturl.swig' %} {% include '_third-party/bookmark.swig' %} {% include '_third-party/copy-code.swig' %} + {% include '_custom/custom.swig' %}