Swconfig of openwrt system switch

Source: Internet
Author: User


Http://blog.csdn.net/oyangshanjin/article/details/38128295


Swconfig is the command used by openwrt to configure the switch.

A switch is a layer-2 device and an essential tool for VLAN configuration.

Swconfig list the switches of the real system.

Swconfig Dev <switch0/eth1> show current port configuration.

The so-called home router = vswitch + network service program + Wireless

Enterprise-level routers also have some routing functions.


[email protected]:~# swconfigswconfig dev <dev> [port <port>|vlan <vlan>] (help|set <key> <value>|get <key>|load <config>|show)[email protected]:~# swconfig dev eth1 showGlobal attributes:        enable_vlan: 1Port 0:        pvid: 0        link: port:0 link:up speed:1000baseT full-duplex txflow rxflowPort 1:        pvid: 2        link: port:1 link:up speed:100baseT full-duplex autoPort 2:        pvid: 2        link: port:2 link:up speed:100baseT full-duplex autoPort 3:        pvid: 1        link: port:3 link:downPort 4:        pvid: 1        link: port:4 link:downVLAN 0:        vid: 0        ports: 0tVLAN 1:        vid: 1        ports: 0t 3 4VLAN 2:        vid: 2        ports: 0t 1 2[email protected]:~# ifconfigbr-lan    Link encap:Ethernet  HWaddr EC:88:8F:30:1D:C8          inet addr:10.1.1.1  Bcast:10.1.1.255  Mask:255.255.255.0          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1          RX packets:1687 errors:0 dropped:15 overruns:0 frame:0          TX packets:1526 errors:0 dropped:0 overruns:0 carrier:0          collisions:0 txqueuelen:0          RX bytes:111729 (109.1 KiB)  TX bytes:124350 (121.4 KiB)br-lan2   Link encap:Ethernet  HWaddr EC:88:8F:30:1D:C8          inet addr:10.0.2.1  Bcast:10.0.2.255  Mask:255.255.255.0          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1          RX packets:18764 errors:0 dropped:0 overruns:0 frame:0          TX packets:21235 errors:0 dropped:0 overruns:0 carrier:0          collisions:0 txqueuelen:0          RX bytes:2125122 (2.0 MiB)  TX bytes:7359281 (7.0 MiB)eth0      Link encap:Ethernet  HWaddr EC:88:8F:30:1D:C7          UP BROADCAST MULTICAST  MTU:1500  Metric:1          RX packets:0 errors:0 dropped:0 overruns:0 frame:0          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0          collisions:0 txqueuelen:1000          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)          Interrupt:4eth1      Link encap:Ethernet  HWaddr EC:88:8F:30:1D:C8          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1          RX packets:330320 errors:0 dropped:0 overruns:0 frame:0          TX packets:644315 errors:0 dropped:0 overruns:0 carrier:0          collisions:0 txqueuelen:1000          RX bytes:24291958 (23.1 MiB)  TX bytes:928701243 (885.6 MiB)          Interrupt:5eth1.1    Link encap:Ethernet  HWaddr EC:88:8F:30:1D:C8          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1          RX packets:0 errors:0 dropped:0 overruns:0 frame:0          TX packets:92 errors:0 dropped:0 overruns:0 carrier:0          collisions:0 txqueuelen:0          RX bytes:0 (0.0 B)  TX bytes:8513 (8.3 KiB)eth1.2    Link encap:Ethernet  HWaddr EC:88:8F:30:1D:C8          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1          RX packets:330320 errors:0 dropped:0 overruns:0 frame:0          TX packets:644223 errors:0 dropped:0 overruns:0 carrier:0          collisions:0 txqueuelen:0          RX bytes:18346198 (17.4 MiB)  TX bytes:926115470 (883.2 MiB)lo        Link encap:Local Loopback          inet addr:127.0.0.1  Mask:255.0.0.0          UP LOOPBACK RUNNING  MTU:16436  Metric:1          RX packets:33237 errors:0 dropped:0 overruns:0 frame:0          TX packets:33237 errors:0 dropped:0 overruns:0 carrier:0          collisions:0 txqueuelen:0          RX bytes:2235750 (2.1 MiB)  TX bytes:2235750 (2.1 MiB)wlan0     Link encap:Ethernet  HWaddr EC:88:8F:30:1D:C8          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1          RX packets:1684 errors:0 dropped:0 overruns:0 frame:0          TX packets:1555 errors:0 dropped:0 overruns:0 carrier:0          collisions:0 txqueuelen:1000          RX bytes:135287 (132.1 KiB)  TX bytes:160545 (156.7 KiB)wlan0-1   Link encap:Ethernet  HWaddr EE:88:8F:30:1D:C8          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1          RX packets:624019 errors:0 dropped:0 overruns:0 frame:0          TX packets:314821 errors:0 dropped:0 overruns:0 carrier:0          collisions:0 txqueuelen:1000          RX bytes:918919244 (876.3 MiB)  TX bytes:27209520 (25.9 MiB)[email protected]:~#


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.