红联Linux门户
Linux帮助

linux下多vlan的dhcp该如何配置?

发布时间:2008-12-15 15:38:58来源:红联作者:city609
设备只用了一个支持802.1Q的交换机(二层),我准备在linux服务器上配置多个vlan,此服务器只有一块网卡,是不是要用到vconfig啊?
文章评论

共有 4 条评论

  1. city609 于 2008-12-16 12:51:46发表:

    好像还需要内核支持包转发功能吧?现在vlan间可以分配到不同网段的ip了,但是vlan间通信不能。

  2. 3XXC 于 2008-12-16 00:26:05发表:

    NAME
    vconfig - VLAN (802.1q) configuration program.

    SYNOPSIS
    vconfig [lots of long options]

    DESCRIPTION
    The vconfig program allows you to create and remove vlan-devices on a
    vlan enabled kernel. Vlan-devices are virtual ethernet devices which
    represents the virtual lans on the physical lan.

    OPTIONS
    add [interface-name] [vlan-id]
    Creates a vlan-device on [interface-name]. The resulting
    vlan-device will be called according to the nameing convention
    set.

    rem [vlan-device]
    Removes the named vlan-device.


    set_flag [vlan-device] 0 | 1
    When 1, ethernet header reorders are turned on. Dumping the
    device will appear as a common ethernet device without vlans.
    When 0(default) however, ethernet headers are not reordered,
    which results in vlan tagged packets when dumping the device.
    Usually the default gives no problems, but some packet filtering
    programs might have problems with it.

    set_egress_map [vlan-device] [skb-priority] [vlan-qos]
    This flags that outbound packets with a particular skb-priority
    should be tagged with the particular vlan priority vlan-qos. The
    default vlan priority is 0.

    set_ingress_map [vlan-device] [skb-priority] [vlan-qos]
    This flags that inbound packets with the particular vlan prior-
    ity vlan-qos should be queued with a particular skb-priority.
    The default skb-priority is 0.

    set_name_type VLAN_PLUS_VID | VLAN_PLUS_VID_NO_PAD | DEV_PLUS_VID |
    DEV_PLUS_VID_NO_PAD
    Sets the way vlan-device names are created. Use vconfig without
    arguments to see the different formats.

    NOTES VLAN will use Broadcom's NICE interface when the network device
    supports it. This is necessary, since usually the hardware of
    these devices already removes the vlan tag from the ethernet
    packet. The set_flag option on vlan-devices created on such a
    physical network device will be ignored. Dumping the net-
    work-device will show only untagged(non-vlan) traffic, and dump-
    ing the vlan-devices will only show traffic intended for that
    vlan, without the tags.

    FILES
    /proc/net/vlan/config
    /proc/net/vlan/[vlan-device]

    SEE ALSO
    ip(8), ifconfig(8)

  3. waynechen 于 2008-12-15 16:51:12发表:

    是的,配制三层VLAN-trunk

  4. Amelia 于 2008-12-15 16:48:43发表:

    VLAN的配置不是只能在交换机上才行吗?