IP Address Configuration of RHEL in VLANTrunk Mode

Source: Internet
Author: User
Today, we got our two-cage Blade Machine and installed the RHEL6U3 system. After installing the First Blade, we planned to configure it as a KICKSTART server to install other blades over the network. Read more: RHEL network-based Blade Server Installation. 1. First, check the number of NICs [root @ blog01

Today, we got our two-cage Blade Machine and installed the RHEL6U3 system. After installing the First Blade, we planned to configure it as a KICKSTART server to install other blades over the network.

Reading:

RHEL network Mount Blade Server http://www.linuxidc.com/Linux/2013-10/91262.htm

However, after the First Blade is installed, set its IP address.

1. First, check the number of NICs.
[Root @ blog01 ~] # Ip
1: lo: Mtu 16436 qdisc noqueue state UNKNOWN
Link/loopback 00: 00: 00: 00: 00: 00 brd 00: 00: 00: 00: 00: 00
Inet 127.0.0.1/8 scope host lo
Inet6: 1/128 scope host
Valid_lft forever preferred_lft forever
2: eth0: Mtu 1500 qdisc mq state UP qlen 1000
Link/ether 38: ea: a7: a1: fd: 66 brd ff: ff
Inet6 fe80: 3aea: a7ff: fea1: fd66/64 scope link
Valid_lft forever preferred_lft forever
3: eth1: Mtu 1500 qdisc noop state DOWN qlen 1000
Link/ether 38: ea: a7: a1: fd: 6a brd ff: ff
4: eth2: Mtu 1500 qdisc noop state DOWN qlen 1000
Link/ether 38: ea: a7: a1: fd: 68 brd ff: ff
5: eth3: Mtu 1500 qdisc noop state DOWN qlen 1000
Link/ether 38: ea: a7: a1: fd: 6c brd ff: ff
6: eth4: Mtu 1500 qdisc noop state DOWN qlen 1000
Link/ether 38: ea: a7: a1: fd: 69 brd ff: ff
7: eth5: Mtu 1500 qdisc noop state DOWN qlen 1000
Link/ether 38: ea: a7: a1: fd: 6d brd ff: ff
8: eth6: Mtu 1500 qdisc noop state DOWN qlen 1000
Link/ether 38: ea: a7: a1: fd: 6e brd ff: ff
9: eth7: Mtu 1500 qdisc noop state DOWN qlen 1000
Link/ether 38: ea: a7: a1: fd: 72 brd ff: ff


2. Check which NICs are connected normally.
[Root @ blog01 ~] # For I in 'seq 0 7'
> Do
> Res = 'ethtool eth $ I | grep Link | awk-F: '{print $2 }''
> Echo "eth $ I Link $ res"
> Done
Eth0 Link yes
Eth1 Link yes
Eth2 Link no
Eth3 Link no
Eth4 Link no
Eth5 Link no
Eth6 Link no
Eth7 Link no

3. We can see that eth0 and eth1 are successfully connected.
4. Configure an IP address for eth0
The IP address range obtained from the customer is 10.196.28.0/24, and the network segment port is set to Trunk mode.
5. manually add eth0 to a vlan with a VLAN id of 528 and configure the IP address
[Root @ blog01 ~] # Vconfig add eth0 528
[Root @ blog01 ~] # Ifconfig eth0.528 10.196.28.43 netmask 255.255.255.0
[Root @ blog01 ~] # Ping-W1-c2 10.196.28.254
PING 10.196.28.254 (10.196.28.254) 56 (84) bytes of data.
64 bytes from 10.196.28.254: icmp_seq = 1 ttl = 255 time = 1.14 MS
64 bytes from 10.196.28.254: icmp_seq = 2 ttl = 255 time = 1.15 MS
--- 10.196.28.254 ping statistics ---
2 packets transmitted, 2 bytes ed, 0% packet loss, time 1002 ms
Rtt min/avg/max/mdev = 1.149/1.154/1.159/0.005 MS

6. Write the NIC configuration file
To make the IP configuration take effect after the system is restarted, write it to the system configuration file.
In addition, the local machine needs to be used as the KVM virtualization platform, so it needs to create a bridge device br0

[Root @ blog01 ~] # Cat/etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE = eth0
ONBOOT = yes
TYPE = Ethernet
BOOTPROTO = none
[Root @ blog01 ~] # Cat/etc/sysconfig/network-scripts/ifcfg-eth0.528
DEVICE = eth0.528
ONBOOT = yes
BOOTPROTO = none
VLAN = yes
TYPE = Ethernet
BRIDGE = br0
[Root @ blog01 ~] # Cat/etc/sysconfig/network-scripts/ifcfg-br0
DEVICE = br0
ONBOOT = yes
BOOTPROTO = none
TYPE = Bridge
IPADDR = 10.196.28.43
NETMASK = 255.255.255.0
GATEWAY = 10.196.28.254

For more details, please continue to read the content on page 1: Http://www.linuxidc.com/Linux/2013-10/91261p2.htm

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.