What does eth0:cp1 refer to in ifconfig on CentOS?

1

I have a basic ubuntu background and am not familiar with the output of an ifconfig on a CentOS server I'm looking at, can someone explain the eth0:cp1, and eth0:cp2 entries here?

How are they handled in iptables?

eth0      Link encap:Ethernet  HWaddr 00:30:48:CD:B7:C6
          inet addr:72.51.xx.xxx  Bcast:72.51.xx.255  Mask:255.255.255.192
          inet6 addr: xxxx::xxx:xxxx:xxxx:b7c6/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:4743057 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3884102 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:1495909136 (1.3 GiB)  TX bytes:1596842222 (1.4 GiB)
          Memory:da020000-da040000

eth0:cp1  Link encap:Ethernet  HWaddr 00:30:48:CD:B7:C6
          inet addr:69.174.xxx.xx  Bcast:69.174.xxx.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          Memory:da020000-da040000

eth0:cp2  Link encap:Ethernet  HWaddr 00:30:48:CD:B7:C6
          inet addr:216.157.xxx.xxx  Bcast:216.157.xxx.235  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          Memory:da020000-da040000

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:745806 errors:0 dropped:0 overruns:0 frame:0
          TX packets:745806 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:267688406 (255.2 MiB)  TX bytes:267688406 (255.2 MiB)

davidparks21

Posted 2011-11-03T01:07:43.283

Reputation: 1 509

Answers

1

These are subinterfaces and a method of adding additional IP addresses along with their subnets to an interface. The part after the colon is arbitrary.

iptables cannot reference subinterfaces, so any rules required would be based on IP addresses, but bound to the physical interface if required.

Paul

Posted 2011-11-03T01:07:43.283

Reputation: 52 173