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.10 9.4 .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,1
: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にあるかどうかを理解する必要があります。 .* 範囲内の他のコンテンツ。

おすすめ記事