SSH Port Forwarding

서버 2014. 1. 12. 12:30

IP Alias

  • IP Alias는 하나의 인터페이스 카드에 여러개의 가상아이피(내부IP 또는 실제IP)를 설정하는 것
  • Windows에서 IP Alias
  • 네트워크 -> 속성
  • Internet Protocol Version 4 (TCP/IPv4) 선택 -> 속성 -> 고급
  • IP 주소 추가
  • Ubuntu Server에서 IP Alias
  • 임시 IP Alias 설정
ifconfig eth0:1 192.168.1.2 netmask 255.255.255.0 broadcast 192.168.1.255
  • 영구 IP Alias 설정
cd /etc/sysconfig/network-script/
cp ifcfg-eth0 ifcfg-eth0:0
   DEVICE=eth0:0
   BOOTPROTO=static
   IPADDR=192.168.1.1
   onBOOT=yes
   USERCTL=no 

   DEVICE=eth0:1
   onBOOT=yes
   BOOTPROTO=static
   IPADDR=192.168.1.2
   NETMASK=255.255.255.0
   NETWORK=192.168.1.0
   BORADCAST=192.168.1.255
   USERCTL=no
  • CentOS에서 IP Alias
ifconfig
   eth0      Link encap:Ethernet  HWaddr 08:00:27:A6:xx:xx
             inet addr:10.0.2.15  Bcast:10.0.2.255  Mask:255.255.255.0
             inet6 addr: fe80::xxxx:xxxxf:fea6:bf3/64 Scope:Link
             UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
             RX packets:224601 errors:574 dropped:0 overruns:0 frame:0
             TX packets:58066 errors:0 dropped:0 overruns:0 carrier:0
             collisions:0 txqueuelen:1000
             RX bytes:304206684 (290.1 MiB)  TX bytes:3266367 (3.1 MiB)
             Interrupt:11 Base address:0xd020

cd /etc/sysconfig/network-scripts/
cp ifcfg-eth0 ifcfg-eth0:0
vi ifcfg-eth0:0
   DEVICE=eth0:0
   ONBOOT=yes
   BOOTPROTO=static
   IPADDR=192.168.0.71
   NETMASK=255.255.255.0
   BORADCAST=192.168.0.255
   USERCTL=no

service network restart
ifconfig
   eth0:0    Link encap:Ethernet  HWaddr 08:00:27:A6:xx:xx
             inet addr:192.168.0.71  Bcast:192.168.0.255  Mask:255.255.255.0
             UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
             Interrupt:11 Base address:0xd020

'서버' 카테고리의 다른 글

VirtuaBox 포트 포워딩  (0) 2014.01.12
VMWare Network 설정  (0) 2014.01.12
CentOS Network 설정  (0) 2014.01.12
Ubuntu Server Network 설정  (0) 2014.01.12
configure한 캐시 지우기  (0) 2014.01.01
Posted by 주말소프트
,