Centos의 다른 서브넷에 속하는 영구 IP 별칭을 만드는 방법

Centos의 다른 서브넷에 속하는 영구 IP 별칭을 만드는 방법

나는 팔로우한다이것내 centos 6.5 시스템에 여러 개의 별칭 IP를 연결하고 생성했지만 이러한 모든 IP는 동일한 서브넷에 속합니다.

내가 가진 것:

내 컴퓨터: eth0, 10.91.56.3
IP 별칭 1: eth0: 1, 10.91.56.4
IP 별칭 1: eth0: 2, 10.91.56.5
IP 별칭 1: eth0: 3, 10.91.56.6
IP 별칭 1: eth0: 4, 10.91 .56.7

이제 내 컴퓨터에 다른 서브넷에 속하지만 더 많은 별칭 IP를 만들고 싶습니다.

내가 원하는 것은:

내 컴퓨터: eth0, 10.91.56.3
IP Alias1:eth0:1, 10.91.56.4
IP Alias1:eth0:2, 10.91.56.5
IP Alias1:eth0:3, 10.91.56.6
IP Alias1:eth0:4, 10.91.56.7
IP Alias1 :eth0:5, 10.91.57.4
IP 별칭1:eth0:6, 10.91.58.5
IP 별칭1:eth0:7, 10.91.59.6
IP 별칭1:eth0:8, 10.91.60.7

출력 ip addr show dev eth0:

[root@PythonClient Desktop]# ip addr show dev eth0
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000
    link/ether 00:0c:29:2b:b7:de brd ff:ff:ff:ff:ff:ff
    inet 10.91.56.3/24 brd 10.91.56.255 scope global eth0
    inet 10.91.56.4/24 brd 10.91.56.255 scope global secondary eth0:1
    inet 10.91.56.13/24 brd 10.91.56.255 scope global secondary eth0:10
    inet 10.91.56.14/24 brd 10.91.56.255 scope global secondary eth0:11
    inet 10.91.56.15/24 brd 10.91.56.255 scope global secondary eth0:12
    inet 10.91.56.16/24 brd 10.91.56.255 scope global secondary eth0:13
    inet 10.91.56.17/24 brd 10.91.56.255 scope global secondary eth0:14
    inet 10.91.56.18/24 brd 10.91.56.255 scope global secondary eth0:15
    inet 10.91.56.19/24 brd 10.91.56.255 scope global secondary eth0:16
    inet 10.91.56.20/24 brd 10.91.56.255 scope global secondary eth0:17
    inet 10.91.56.21/24 brd 10.91.56.255 scope global secondary eth0:18
    inet 10.91.56.22/24 brd 10.91.56.255 scope global secondary eth0:19
    inet 10.91.56.5/24 brd 10.91.56.255 scope global secondary eth0:2
    inet 10.91.56.23/24 brd 10.91.56.255 scope global secondary eth0:20
    inet 10.91.56.24/24 brd 10.91.56.255 scope global secondary eth0:21
    inet 10.91.56.25/24 brd 10.91.56.255 scope global secondary eth0:22
    inet 10.91.56.26/24 brd 10.91.56.255 scope global secondary eth0:23
    inet 10.91.56.27/24 brd 10.91.56.255 scope global secondary eth0:24
    inet 10.91.56.28/24 brd 10.91.56.255 scope global secondary eth0:25
    inet 10.91.56.29/24 brd 10.91.56.255 scope global secondary eth0:26
    inet 10.91.56.30/24 brd 10.91.56.255 scope global secondary eth0:27
    inet 10.91.56.31/24 brd 10.91.56.255 scope global secondary eth0:28
    inet 10.91.56.32/24 brd 10.91.56.255 scope global secondary eth0:29
    inet 10.91.56.6/24 brd 10.91.56.255 scope global secondary eth0:3
    inet 10.91.56.33/24 brd 10.91.56.255 scope global secondary eth0:30
    inet 10.91.56.34/24 brd 10.91.56.255 scope global secondary eth0:31
    inet 10.91.56.35/24 brd 10.91.56.255 scope global secondary eth0:32
    inet 10.91.56.36/24 brd 10.91.56.255 scope global secondary eth0:33
    inet 10.91.56.37/24 brd 10.91.56.255 scope global secondary eth0:34
    inet 10.91.56.38/24 brd 10.91.56.255 scope global secondary eth0:35
    inet 10.91.56.39/24 brd 10.91.56.255 scope global secondary eth0:36
    inet 10.91.56.40/24 brd 10.91.56.255 scope global secondary eth0:37
    inet 10.91.56.41/24 brd 10.91.56.255 scope global secondary eth0:38
    inet 10.91.56.42/24 brd 10.91.56.255 scope global secondary eth0:39
    inet 10.91.56.7/24 brd 10.91.56.255 scope global secondary eth0:4
    inet 10.91.56.43/24 brd 10.91.56.255 scope global secondary eth0:40
    inet 10.91.56.44/24 brd 10.91.56.255 scope global secondary eth0:41
    inet 10.91.56.45/24 brd 10.91.56.255 scope global secondary eth0:42
    inet 10.91.56.46/24 brd 10.91.56.255 scope global secondary eth0:43
    inet 10.91.56.47/24 brd 10.91.56.255 scope global secondary eth0:44
    inet 10.91.56.48/24 brd 10.91.56.255 scope global secondary eth0:45
    inet 10.91.56.49/24 brd 10.91.56.255 scope global secondary eth0:46
    inet 10.91.56.50/24 brd 10.91.56.255 scope global secondary eth0:47
    inet 10.91.56.51/24 brd 10.91.56.255 scope global secondary eth0:48
    inet 10.91.56.52/24 brd 10.91.56.255 scope global secondary eth0:49
    inet 10.91.56.8/24 brd 10.91.56.255 scope global secondary eth0:5
    inet 10.91.56.53/24 brd 10.91.56.255 scope global secondary eth0:50
    inet 10.91.56.9/24 brd 10.91.56.255 scope global secondary eth0:6
    inet 10.91.56.10/24 brd 10.91.56.255 scope global secondary eth0:7
    inet 10.91.56.11/24 brd 10.91.56.255 scope global secondary eth0:8
    inet 10.91.56.12/24 brd 10.91.56.255 scope global secondary eth0:9
    inet6 fe80::20c:29ff:fe2b:b7de/64 scope link 
       valid_lft forever preferred_lft forever

어떻게 이를 달성할 수 있나요?

답변1

사용하고 있는 IP 주소IP 주소 예약범위는 약 1,600만 개의 주소를 수용할 수 있습니다. 마스크를 255.0.0.0 또는 255.255.0.0으로 설정할 수 있습니다. 서브넷에 더 많은 클라이언트를 원할 경우 255.255.255.0으로 제한할 필요가 없습니다.

이는 게이트웨이에 영향을 주지 않지만 해당 게이트웨이가 10.91.56.*/24 범위에 있지 않기 때문에 게이트웨이에 액세스하는 방법과 추가한 주소가 10.91.57에 있는지 여부를 이해해야 합니다. .* 범위 내의 다른 콘텐츠.

관련 정보