当前位置:首页>开发>正文

router怎样实现路由跳转 vue router-link-active

2023-04-13 23:29:59 互联网 未知 开发

 router怎样实现路由跳转 vue router-link-active

router怎样实现路由跳转

步骤/方法
1设置计算机A的IP为192.168.1.2子网掩码为255.255.255.0网关为192.169.1.1!

步骤阅读 .3设置计算机B的IP为192.168.2.2子网掩码为255.255.255.0网关为192.169.2.1!

步骤阅读 .5给路由A的fastEthernet 0/0端口配置IP为192.168.1.1子网掩码为255.255.255.0,由于路由默认的端口是关闭的,所以在给路由端口配置好IP以后,要注意用no shutdown(不关闭)命令把端口开启!如下是配置路由A端口fastEthernet 0/0的所有命令:

Continuewith configuration dialog? [yes/no]: no

Router#configure terminal(进入全局配置模式)

Router(config)#interfacefastEthernet 0/0(进入端口模式,进入端口0/0了)

Router(config-if)#noshutdown(开启端口)
步骤阅读 .7给路由A的fastEthernet 1/0端口配置IP为192.168.3.1子网掩码为255.255.255.0,如下是配置路由A端口fastEthernet1/0的所有命令

Router(config-if)#exit(从0/0端口退回到全局配置模式)

Router(config)#interfacefastEthernet 1/0(进入1/0端口)

Router(config-if)#ipaddress 192.168.3.1 255.255.255.0(给端口1/0配置好了IP跟子网掩码)

Router(config-if)#noshutdown(开启端口)

%LINK-5-CHANGED:Interface FastEthernet1/0, changed state to up

Router(config-if)#exit(从1/0端口退回到全局配置模式)

步骤阅读 .8给路由B的fastEthernet 1/0端口配置IP为192.168.3.2子网掩码为255.255.255.0,如下是配置路由B端口fastEthernet1/0的所有命令

Continuewith configuration dialog? [yes/no]: no

Router>enable(进入特权模式)

Router#configure terminal(进入全局配置模式)

Enterconfiguration commands, one per line.End with CNTL/Z.

Router(config)#interfacefastEthernet 0/0(进入端口模式,进入端口0/0了)

Router(config-if)#ipaddress 192.168.3.2 255.255.255.0(给端口0/0配置好了IP,子网掩码)

Router(config-if)#noshutdown(开启端口)

步骤阅读 .9给路由B的fastEthernet 0/0端口配置IP为192.168.2.1子网掩码为255.255.255.0,如下是配置路由A端口fastEthernet1/0的所有命令

Router(config-if)#exit(从0/0端口退回到全局配置模式)

Router(config)#interface fastEthernet 1/0(进入1/0端口)

Router(config-if)#ip address 192.168.2.1 255.255.255.0(给端口1/0配置好了IP跟子网掩码)

Router(config-if)#no shutdown(开启端口)

%LINK-5-CHANGED: Interface FastEthernet1/0, changed state to up

Router(config-if)#exit(从1/0端口退回到全局配置模式)

步骤阅读 .10给路由B设置静态跳转,若遇到访问计算机A(也就是192.168.1.0)这个网段的数据包,给他规定了往路由A的1/0端口(也就是192.168.3.1)跳转,再在跳转后到达的路由查询路由表,查询计算机A(也就是192.168.1.0)的这个网段再转发数据包!具体命令如下:

Router(config)#iproute 192.168.1.0 255.255.255.0 192.168.3.1(在全局配置模式下)

步骤阅读 .11在路由A也设置一个跳转,要不数据发送出去了,找不到回来就路,那么就没返回信息了!具体命令如下:

Router(config)#iproute 192.168.2.0 255.255.255.0 192.168.3.2(在全局配置模式下)

步骤阅读 .12用ping命令测试全网是否连通了!如果前面的步骤你都没操作错的话,那么现在的测试
满意请采纳谢谢

vue router-link-active

router-link 标签 在选中的时候 会自动给整个标签添加一个 router-link-active的class 你可以根据这个class 设置他的样式。 如果再选中 其他的。 这个class 就会消失 。 从而样式也就会消失
你的router-link-active 不应该在span 上 而是在 router-link 上
css 上 应该写成 .router-link-active>span {} 而不是.router-link-active {}

最新文章