写真のような状況です:ネットワークスキーム
Centos VM がインターネットにアクセスできるようにしたいのですが、Windows シェルに入力する正しいコマンドは何ですか? regedit.exe で IPRouting をすでに有効にしています。ここに 2 つのルーティング テーブルを配置しました。1 つは設定後、もう 1 つは Windows インターネット共有を有効にした後です。同じように見えますが、最初のものは機能せず、2 番目は機能します。
IPv4 Route Table
===========================================================================
Active Routes:
Network Destination Netmask Gateway Interface Metric
0.0.0.0 0.0.0.0 192.168.40.2 192.168.40.129 266
127.0.0.0 255.0.0.0 On-link 127.0.0.1 306
127.0.0.1 255.255.255.255 On-link 127.0.0.1 306
127.255.255.255 255.255.255.255 On-link 127.0.0.1 306
192.168.2.0 255.255.255.0 On-link 192.168.2.129 266
192.168.2.129 255.255.255.255 On-link 192.168.2.129 266
192.168.2.255 255.255.255.255 On-link 192.168.2.129 266
192.168.40.0 255.255.255.0 On-link 192.168.40.129 266
192.168.40.129 255.255.255.255 On-link 192.168.40.129 266
192.168.40.255 255.255.255.255 On-link 192.168.40.129 266
224.0.0.0 240.0.0.0 On-link 127.0.0.1 306
224.0.0.0 240.0.0.0 On-link 192.168.40.129 266
224.0.0.0 240.0.0.0 On-link 192.168.2.129 266
255.255.255.255 255.255.255.255 On-link 127.0.0.1 306
255.255.255.255 255.255.255.255 On-link 192.168.40.129 266
255.255.255.255 255.255.255.255 On-link 192.168.2.129 266
===========================================================================
Persistent Routes:
Network Address Netmask Gateway Address Metric
0.0.0.0 0.0.0.0 192.168.40.2 Default
===========================================================================
===========================================================================
IPv4 Route Table
===========================================================================
Active Routes:
Network Destination Netmask Gateway Interface Metric
0.0.0.0 0.0.0.0 192.168.40.2 192.168.40.129 266
127.0.0.0 255.0.0.0 On-link 127.0.0.1 306
127.0.0.1 255.255.255.255 On-link 127.0.0.1 306
127.255.255.255 255.255.255.255 On-link 127.0.0.1 306
192.168.40.0 255.255.255.0 On-link 192.168.40.129 266
192.168.40.129 255.255.255.255 On-link 192.168.40.129 266
192.168.40.255 255.255.255.255 On-link 192.168.40.129 266
192.168.137.0 255.255.255.0 On-link 192.168.137.1 266
192.168.137.1 255.255.255.255 On-link 192.168.137.1 266
192.168.137.255 255.255.255.255 On-link 192.168.137.1 266
224.0.0.0 240.0.0.0 On-link 127.0.0.1 306
224.0.0.0 240.0.0.0 On-link 192.168.40.129 266
224.0.0.0 240.0.0.0 On-link 192.168.137.1 266
255.255.255.255 255.255.255.255 On-link 127.0.0.1 306
255.255.255.255 255.255.255.255 On-link 192.168.40.129 266
255.255.255.255 255.255.255.255 On-link 192.168.137.1 266
===========================================================================
Persistent Routes:
Network Address Netmask Gateway Address Metric
0.0.0.0 0.0.0.0 192.168.40.2 Default
===========================================================================