config vlan in FC8

  • 1. Network configuration on the Linux server:
    a)
    The main interface ethX (the Ethernet interface connects to the test-bed): 192.168.0.252/24
    b)
    Creating the sub-interfaces:
    - Make a copy of /etc/sysconfig/network-scripts/ifcfg-ethX and name it ifcfg- ethX:1.

    - Open the file created in the step above and change the device name, IP address and subnet mask appropriately (ifcfg-ethX:1, 172.21.0.252/16).

    - Repeat the two steps above to make another 5 sub-interfaces with IP addresses ranging from 172.22.0.252 to 172.26.0.252.

    - Restart network service to bring the new sub-interfaces up.
    c)
    Creating VLAN interfaces:
    - Use the command ‘vconfig add eth0 2’ to add vlan 2 to the server.

    - Use the command ‘vconfig add eth0 4094’ to add vlan 4094 to the server.

    - Use the command ‘ifconfig eth0.2 20.0.2.252 netmask 255.255.255.0’ to configure IP d)configuration for interface eth0.2.

    - Use the command ‘ifconfig eth0.4094 20.15.254.252 netmask 255.255.255.0’ to configure IP configuration for interface eth0.4094.

    - Go to /etc/sysconfig/network-scripts/

    - Make clone of the configuration file of the ethernet interface that connects to the testbed (it is ifcfg-eth0 in my system) and name them ifcfg-eth0.2 and ifcfg-eth0.4094.

    - Edit those files to update the device name to the new names (eth0.2, eth0.4094), add VLAN=yes, update IPADDR to the new addresses (20.0.2.252/24, 20.15.254.252/24)

    - Restart network service
  • 2. Install and configure DHCP Server:
    - The Dynamic Host Configuration Protocol (DHCP) can be used to assign IP addresses to a network’s machines DHCP supports the static assignment of IP addresses, using a preconfigured table of associations from physical (MAC) addresses to IP addresses. DHCP also supports dynamic IP assignment, with respect to an IP address range specified during DHCP setup. In our testbed, the DHCP Server is used for assigning IP addresses to the ZoneDirector and the associated clients.

    - DHCP can be installed on the Kickstart server the Fedora Core’s yum package. Use yum to add DHCP to a minimal installation of Fedora Core 4 with the following command.

    yum install DHCP

    After installing DHCP Server on the server, change some value in the dhcpd.conf file as below:


ddns-update-style interim;
ignore client-updates;
option domain-name-servers 192.168.0.252;
subnet 192.168.0.0 netmask 255.255.255.0 {

# --- default gateway
option routers 192.168.0.252;
option subnet-mask 255.255.255.0;
option domain-name "mydomain.com";
# --- Selects point-to-point node (default is hybrid). Don't change this unless
# -- you understand Netbios very well
# option netbios-node-type 2;
range dynamic-bootp 192.168.0.128 192.168.0.250;

default-lease-time 21600;
max-lease-time 43200;

# we want the nameserver to appear at a fixed address

host ZoneDirector {

hardware ethernet 00:1D:2E:00:45:60; #MAC address of ZoneDirector
fixed-address 192.168.0.2;

}

}

# For vlan 2
subnet 20.0.2.0 netmask 255.255.255.0 {
# --- default gateway
option routers 20.0.2.252;
option domain-name-servers 20.0.2.252;
range dynamic-bootp 20.0.2.100 20.0.2.200;

default-lease-time 21600;
max-lease-time 43200;

}

# For vlan 4094
subnet 20.15.254.0 netmask 255.255.255.0 {
# --- default gateway
option routers 20.15.254.252;
option domain-name-servers 20.15.254.252;
range dynamic-bootp 20.15.254.100 20.15.254.200;

default-lease-time 21600;
max-lease-time 43200;

}

沒有留言:

張貼留言