티스토리 뷰

* 현재 IP 및 subnet mask 확인하기

[root@localhost /]# ip addr show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue
    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: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast qlen 1000
    link/ether 00:1a:4a:3e:0e:1b brd ff:ff:ff:ff:ff:ff
    inet 10.62.207.106/24 brd 10.62.207.255 scope global eth0
    inet6 fe80::21a:4aff:fe3e:e1b/64 scope link
       valid_lft forever preferred_lft forever
3: sit0: <NOARP> mtu 1480 qdisc noop
    link/sit 0.0.0.0 brd 0.0.0.0
또는

[root@localhost /]# ifconfig -a
eth0      Link encap:Ethernet  HWaddr 00:1A:4A:3E:0E:1B
          inet addr:10.62.207.106  Bcast:10.62.207.255  Mask:255.255.255.0
          inet6 addr: fe80::21a:4aff:fe3e:e1b/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:52028 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2616 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:6104224 (5.8 MiB)  TX bytes:408688 (399.1 KiB)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:1107 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1107 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:1639116 (1.5 MiB)  TX bytes:1639116 (1.5 MiB)

sit0      Link encap:IPv6-in-IPv4
          NOARP  MTU:1480  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

 

 

* 디폴트 게이트웨이 확인

[root@localhost /]# ip route show
10.62.207.0/24 dev eth0  proto kernel  scope link  src 10.62.207.106
169.254.0.0/16 dev eth0  scope link
default via 10.62.207.1 dev eth0

또는
[root@localhost /]# netstat -nr
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
10.62.207.0     0.0.0.0         255.255.255.0   U         0 0          0 eth0
169.254.0.0     0.0.0.0         255.255.0.0     U         0 0          0 eth0
0.0.0.0         10.62.207.1     0.0.0.0         UG        0 0          0 eth0

 

* DNS name server 확인

[root@localhost /]# cat /etc/resolv.conf

nameserver 165.X.X.X

search localdomain

 

* 변경할 ethernet카드를 shutdown 하고 ip변경

[root@localhost /]# ifdown eth0

[root@localhost /]# vi /etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE=eth0
BOOTPROTO=none
ONBOOT=yes
HWADDR=00:1a:4a:3e:0e:1b
IPADDR=10.62.207.106
NETMASK=255.255.255.0
GATEWAY=10.62.207.1

[root@localhost /]# vi /etc/resolv.conf      ## DNS

[root@localhost /]# vi /etc/sysconfig/network      ## hostname

[root@localhost /]# ifup eth0

[root@localhost /]# ping 10.62.207.1

 



 

'IA > System Admin' 카테고리의 다른 글

Minimal DNS Server 구현  (0) 2011.02.27
원격 서버에 로깅하기(로그 중앙집중화)  (0) 2011.02.27
IPv6 사용중지  (0) 2011.02.26
NIS 사용 구성  (0) 2011.02.24
[Kernel and network configuration] ping 응답 허용하지 않기  (0) 2011.02.20
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2025/06   »
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30
글 보관함