Chinaunix首页 | 论坛 | 博客
  • 博客访问: 5854
  • 博文数量: 3
  • 博客积分: 10
  • 博客等级: 民兵
  • 技术积分: 20
  • 用 户 组: 普通用户
  • 注册时间: 2011-03-06 02:01
文章分类

全部博文(3)

文章存档

2015年(3)

我的朋友
最近访客

分类: LINUX

2015-09-24 22:04:47

今天拿到客户两笼刀片机,进行RHEL6U3系统的安装操作,打算安装完第一台刀片之后,将其配置成KICKSTART服务器对其他刀片进行网络安装。

相关阅读

RHEL网络安装刀片服务器  > 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. 可以看出eth0,eth1是连接成功的
4. 对eth0配置IP地址
从客户获得的IP设置范围是10.196.28.0/24 ,该网段端口被设置成了Trunk模式。
5.手动将eth0加入vlan id为528的VLAN,并配置IP
[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 received, 0% packet loss, time 1002ms
rtt min/avg/max/mdev = 1.149/1.154/1.159/0.005 ms

6.写入网卡配置文件
为了使得系统重启后,IP配置仍旧生效,写入系统配置文件
另外本机需要作为KVM虚拟化平台,故需要创建桥接设备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

7.重新启动网络服务,查看最终网卡配置信息
[root@blog01 ~ ]# service network restart
[root@blog01  ~]# cat /proc/net/vlan/config
VLAN Dev name    | VLAN ID
Name-Type: VLAN_NAME_TYPE_RAW_PLUS_VID_NO_PAD
eth0.528      | 528  | eth0
[root@SJC42KVM01 ~]# brctl  show
bridge name    bridge id        STP enabled    interfaces
br0        8000.38eaa7a1fd66    no        eth0.528
[root@SJC42KVM01 ~]# ifconfig  eth0
eth0      Link encap:Ethernet  HWaddr 38:EA:A7:A1:FD:66 
          inet6 addr: fe80::3aea:a7ff:fea1:fd66/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:14600981 errors:0 dropped:0 overruns:0 frame:0
          TX packets:16880 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:1175506152 (1.0 GiB)  TX bytes:4080056 (3.8 MiB)
[root@blog01  ~]# ifconfig  eth0.528
eth0.528  Link encap:Ethernet  HWaddr 38:EA:A7:A1:FD:66 
          inet6 addr: fe80::3aea:a7ff:fea1:fd66/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:600 errors:0 dropped:0 overruns:0 frame:0
          TX packets:313 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:66715 (65.1 KiB)  TX bytes:57925 (56.5 KiB)
[root@blog01 ~]# ifconfig  br0
br0      Link encap:Ethernet  HWaddr 38:EA:A7:A1:FD:66 
          inet addr:10.196.28.43  Bcast:10.196.28.255  Mask:255.255.255.0
          inet6 addr: fe80::3aea:a7ff:fea1:fd66/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:549 errors:0 dropped:0 overruns:0 frame:0
          TX packets:345 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:63581 (62.0 KiB)  TX bytes:64296 (62.7 KiB)

8.测试网络连接是否通畅
[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.31 ms
64 bytes from 10.196.28.254: icmp_seq=2 ttl=255 time=0.907 ms
--- 10.196.28.254 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1002ms
rtt min/avg/max/mdev = 0.907/1.108/1.310/0.204 ms
[root@blog01 ~]# ping -W1 -c2  10.192.28.254
PING 10.192.28.254 (10.192.28.254) 56(84) bytes of data.
64 bytes from 10.192.28.254: icmp_seq=1 ttl=249 time=2.63 ms
64 bytes from 10.192.28.254: icmp_seq=2 ttl=249 time=2.78 ms
--- 10.192.28.254 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1004ms
rtt min/avg/max/mdev = 2.635/2.709/2.784/0.090 ms

配置完成!



阅读(507) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~