а на шлюз 10.0.4.2 Cisco не идет
причем через коммандную строку получается оба а через АПИ - нет
может я в вызове АПИ что неправилно делаю
Помогите пожалуиста
Спасибо
- Код: Выделить всё
0x1 ........................... MS TCP Loopback interface
0x2 ...00 0c 76 a2 c6 3f ...... Intel(R) PRO/100 VE Network Connection - Paketplaner-Miniport
0x80004 ...00 53 45 00 00 00 ...... WAN (PPP/SLIP) Interface
0x80005 ...00 05 9a 3c 78 00 ...... Cisco Systems VPN Adapter - Paketplaner-Miniport
Aktiv Route:
maske Gateway Interface
0.0.0.0 0.0.0.0 192.168.2.1 192.168.2.133 20
10.0.0.0 255.0.0.0 10.0.3.2 10.0.3.2 1
10.0.3.2 255.255.255.255 127.0.0.1 127.0.0.1 50
10.0.4.0 255.255.255.0 10.0.4.2 10.0.4.2 20
10.0.4.2 255.255.255.255 127.0.0.1 127.0.0.1 20
10.255.255.255 255.255.255.255 10.0.3.2 10.0.3.2 50
10.255.255.255 255.255.255.255 10.0.4.2 10.0.4.2 20
127.0.0.0 255.0.0.0 127.0.0.1 127.0.0.1 1
192.168.1.0 255.255.255.0 10.0.4.2 10.0.4.2 1
192.168.1.20 255.255.255.255 10.0.3.2 10.0.3.2 1 - это мнои положенныи роутинг. Надо положить такои же на 10.0.4.2 ,
192.168.2.0 255.255.255.0 192.168.2.133 192.168.2.133 20
192.168.2.133 255.255.255.255 127.0.0.1 127.0.0.1 20
192.168.2.255 255.255.255.255 192.168.2.133 192.168.2.133 20
192.168.50.0 255.255.255.0 10.0.4.2 10.0.4.2 1
192.168.51.0 255.255.255.0 10.0.4.2 10.0.4.2 1
218.14.169.17 255.255.255.255 192.168.2.1 192.168.2.133 20
224.0.0.0 240.0.0.0 10.0.3.2 10.0.3.2 50
224.0.0.0 240.0.0.0 10.0.4.2 10.0.4.2 20
224.0.0.0 240.0.0.0 192.168.2.133 192.168.2.133 20
255.255.255.255 255.255.255.255 10.0.3.2 10.0.3.2 1
255.255.255.255 255.255.255.255 10.0.4.2 10.0.4.2 1
255.255.255.255 255.255.255.255 192.168.2.133 192.168.2.133 1
Standardgateway: 192.168.2.1
===========================================================================
Standige Routen:
No
Это вызов АПИ
- Код: Выделить всё
Public Function RouteAdd(ByVal sInterfaceIndex As Integer, ByVal sForwardDestination As String, ByVal sForwardMask As String, ByVal sGateway As String) As Boolean
'MsgBox(sInterfaceIndex.ToString)
Dim IPForwardTable As MIB_IPFORWARDROW
With IPForwardTable
.dwForwardDest = inet_addr(sForwardDestination)
.dwForwardIfIndex = sInterfaceIndex
.dwForwardMask = inet_addr(sForwardMask)
'.dwForwardNextHop = inet_addr(sGateway)
'.dwForwardAge = 0
'.dwForwardMetric1 = 1
'dwForwardProto
'2 - MIB_IPPROTO_LOCAL
'3 - PROTO_IP_NETMGMT
'4 - next hop = final dest
'? - PROTO_IP_NT_STATIC
'.dwForwardProto = 3
'.dwForwardPolicy = 0
'.dwForwardType = 1
'.dwForwardNextHopAS = 1
'.dwForwardMetric2 = -1
'.dwForwardMetric3 = -1
'.dwForwardMetric4 = -1
'.dwForwardMetric5 = -1
'MsgBox("" + sForwardDestination.ToString + "")
'MsgBox("" + sInterfaceIndex.ToString + "")
'MsgBox("" + sForwardMask.ToString + "")
'MsgBox("" + sGateway.ToString + "")
RouteResult = CreateIpForwardEntry(IPForwardTable)
If RouteResult = 0 Then
Else
End If
End With
Return (RouteResult)
End Function