4,557,079 th visitor since 2017.2.1 ( Today : 1826 )
Computer ???
No. 444
Name. swindler
Subject. Private Lan 구성
Main Cate. Linux
Sub Cate.
Date. 2013-11-29 15:35
Hit. 2882 (211.36.27.3)
File.
서버 2대를 secondary NIC를 설치하여 내부망을 구성하는 방법

Server #1
cat ifcfg-em1
DEVICE=em1
HWADDR=78:2b:cb:00:f5:40
TYPE=Ethernet
UUID=c0f9639a-5255-479d-84ad-c874f341cc4d
ONBOOT=yes
NM_CONTROLLED=yes
BOOTPROTO=none
IPADDR=209.190.94.114
NETMASK=255.255.255.248
GATEWAY=209.190.94.113
DNS1=209.190.74.89
IPV6INIT=no
USERCTL=no


cat ifcfg-em2
DEVICE=em2
HWADDR=78:2B:CB:00:F5:41
TYPE=Ethernet
UUID=f176e2d1-857e-4ab1-80dc-f1ec30e8d633
ONBOOT=yes
NM_CONTROLLED=yes
BOOTPROTO=none
IPV6INIT=no
USERCTL=no
NETMASK=255.255.255.0
IPADDR=192.168.0.114


route -n 으로 조회를 해 보면 다음과 같이 알아서 세팅되어 있다.
route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
209.190.94.112 0.0.0.0 255.255.255.248 U 0 0 0 em1
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 em2
169.254.0.0 0.0.0.0 255.255.0.0 U 1002 0 0 em1
169.254.0.0 0.0.0.0 255.255.0.0 U 1003 0 0 em2
0.0.0.0 209.190.94.113 0.0.0.0 UG 0 0 0 em1



Server #2
cat ifcfg-eth0
# Broadcom Corporation NetXtreme BCM5720 Gigabit Ethernet PCIe
DEVICE=eth0
BOOTPROTO=none
HWADDR=d4:ae:52:8e:59:9d
ONBOOT=yes
NETMASK=255.255.255.240
IPADDR=209.190.93.210
GATEWAY=209.190.93.209
TYPE=Ethernet

cat ifcfg-eth1
# Broadcom Corporation NetXtreme BCM5720 Gigabit Ethernet PCIe
DEVICE=eth1
BOOTPROTO=none
HWADDR=d4:ae:52:8e:59:9e
ONBOOT=yes
NETMASK=255.255.255.0
IPADDR=192.168.0.210
TYPE=Ethernet


route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
209.190.93.208 0.0.0.0 255.255.255.240 U 0 0 0 eth0
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth1
0.0.0.0 209.190.93.209 0.0.0.0 UG 0 0 0 eth0



/etc/rc.d/init.d/network eth1 up 과 같이 실행하면
IP가 잡히지 않는데,
ifup eth1 로 실행하면 정상적으로 IP가 잡힌다.

secondary NIC에 GATEWAY를 설정하게 되면
전체 네트웍이 정상적으로 작동하지 않을 수 있다.



[바로가기 링크] : http://coolx.net/cboard/computer/444



Name
Password
Comment
Copyright © 1999-2017, swindler. All rights reserved. 367,611 visitor ( 1999.1.8-2004.5.26 ), 2,405,771 ( -2017.01.31)

  2HLAB   2HLAB_Blog   RedToolBox   Omil   Omil_Blog