CCNP 以Packet Size決定不同Gateway out

 matchlength

Goal:
HK network(R5) connect to China network(R4) via ISP MPLS for smaller packet, and the bigger packet via own VPN

R4
interface FastEthernet0/0
ip address 172.20.20.3 255.255.255.0

ip route 0.0.0.0 0.0.0.0 172.20.20.1
ip route 0.0.0.0 0.0.0.0 172.20.20.2

R1
interface FastEthernet0/0
ip address 192.168.0.252 255.255.255.0
interface FastEthernet0/1
ip address 172.20.20.1 255.255.255.0

ip route 10.0.0.0 255.255.255.0 192.168.0.254

R2
interface FastEthernet0/0
ip address 192.168.0.253 255.255.255.0
interface FastEthernet0/1
ip address 172.20.20.2 255.255.255.0

ip route 10.0.0.0 255.255.255.0 192.168.0.254

R6
interface FastEthernet0/0
ip address 8.8.8.8 255.255.255.0

ip route 10.0.0.0 255.255.255.0 8.8.8.9

R3
interface FastEthernet0/0
ip address 192.168.0.254 255.255.255.0
interface FastEthernet0/1
ip address 10.0.0.2 255.255.255.0
interface FastEthernet1/0
ip address 8.8.8.9 255.255.255.0

ip route 172.20.20.0 255.255.255.0 192.168.0.252
ip route 172.20.20.0 255.255.255.0 192.168.0.253

access-list 101 permit ip any 172.20.20.0 0.0.0.255

route-map lab1 permit 10
match ip address 101
match length 0 100
set ip next-hop 192.168.0.252

route-map lab1 permit 20
match ip address 101
match length 101 2147483647
set ip next-hop 192.168.0.253

R5
interface FastEthernet0/0
ip address 10.0.0.1 255.255.255.0

ip route 0.0.0.0 0.0.0.0 10.0.0.2

Verify:

R3
debug ip policy

R5
Ping
Protocol [ip]:
Target IP address: 172.20.20.3
Repeat count [5]:
Datagram size [100]:
Timeout in seconds [2]:
Extended commands [n]:
Sweep range of sizes [n]:

matchlength2

Ping
Protocol [ip]:
Target IP address: 172.20.20.3
Repeat count [5]:
Datagram size [100]: 101
Timeout in seconds [2]:
Extended commands [n]:
Sweep range of sizes [n]:

matchlength3

Increase office 365 Send & Receive attachment and message size

Get-MailboxPlan | fl name,maxsendsize,maxreceivesize,isdefault
Name : ExchangeOnline-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
MaxSendSize : 35 MB (36,700,160 bytes)
MaxReceiveSize : 36 MB (37,748,736 bytes)
IsDefault : False

Name : ExchangeOnlineDeskless-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
MaxSendSize : 35 MB (36,700,160 bytes)
MaxReceiveSize : 36 MB (37,748,736 bytes)
IsDefault : False

Name : ExchangeOnlineEnterprise-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
MaxSendSize : 35 MB (36,700,160 bytes)
MaxReceiveSize : 36 MB (37,748,736 bytes)
IsDefault : True

Get-Mailbox username | fl mailboxplan,maxsendsize,maxreceivesize
username ExchangeOnline-xxxxxxxx-xx… 35 MB (36,700,160 bytes) 36 MB (37,748,736 bytes)

Set-Mailbox username -MaxSendSize 50MB -MaxReceiveSize 51MB

Set-MailboxPlan ExchangeOnline-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx -MaxSendSize 50MB -MaxReceiveSize 51MB
Set-MailboxPlan ExchangeOnlineDeskless-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx -MaxSendSize 50MB -MaxReceiveSize 51MB
Set-MailboxPlan ExchangeOnlineEnterprise-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx -MaxSendSize 50MB -MaxReceiveSize 51MB

Create Testing attachment file:
fsutil file createnew C:\45GBTest 47185920

Powershell to Office 365

$URL = “https://ps.outlook.com/powershell”
$Credentials = Get-Credential -Message “Enter your Office 365 admin credentials”
$EXOSession = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri $URL -Credential $Credentials -Authentication Basic -AllowRedirection -Name “Exchange Online”
Import-PSSession $EXOSession

If got the error, “cannot be loaded because the execution of scripts is disabled on this system”
Set-ExecutionPolicy RemoteSigned

Windows 2008 R2 + Exchange 2010

ServerManagerCmd -ip D:\Scripts\Exchange-Typical.xml -Restart
Set-Service NetTcpPortSharing -StartupType Automatic
http://go.microsoft.com/fwlink/?LinkID=191548

https://technet.microsoft.com/en-us/library/bb691354%28EXCHG.140%29.aspx
https://technet.microsoft.com/zh-cn/library/bb691354%28v=exchg.141%29.aspx

get-user -filter “department” -eq ‘sales'”
get-user -filter “department” -like ‘sales*'”
get-mailbox administrator | fl name,emailaddresses
get-casmailbox

Set on behalf of and send as permission:
set-mailbox boss -grantsendonbehalfto assistant
add-adpermission boss -extendedrights send-as -user assistant
restart-server msexchangeis

Show the user forwarding status:
get-mailbox Username | fl name,forwardingaddress,delivertomailboxandforward,recipientlimits

Show each user send receive limit:
get-mailbox | ft name,maxsendsize,maxreceivesize

Global message size limit:
get-transportconfig | fl max*size,maxrecipientenvelopelimit

Add retention deleted items:
new-retentionpolicytag “tag-deleteditems” -type “deleteditems” -comment “deleted items are purged in 60 days” -retentionenabled $true -agelimitforretention 60 -retentionaction permanentlydelete

Add retention default policy:
new-retentionpolicytag “tag-default” -type all -comment “items without a retention tag are deleted in 1 year.” -retentionenabled $true -agelimitforretention 365 -retentionaction movetodeleteditems -isprimary $true

Add retention business policy:
new-retentionpolicytag “tag-businesscritical” -type personal -comment “business critical messages are moved to the archive in 3 years.” -retentionenabled $true -agelimitforretention 1095 -retentionaction movetoarchive

Add retention group:
new-retentionpolicy “RP1” -retentionpolicytaglinks “tag-deleteditems”,”tag-businesscritical”,”tag-default”

Apply to user:
set-mailbox username -retentionpolicy RP1 -confirm:$false

restart-server msexchangeis
start-managedfolderassistant

Remove retention:
set-mailbox username -retentionpolicy $null
remove-retentionpolicy RP1
get-retentionpolicytag | remove-retentionpolicytag

Grant fullright access from user1 to user2:
add-mailboxpermission user1 -accessrights fullaccess -user user2

Display all edb path
get-mailboxdatabase | fl name,edbfilepath

Show state(Clean or Drily):
eseutil /mh

Repair with transaction log:
eseutil /r E05

eseutil /p

Integrity:
eseutil /g

Checksum:
eseutil /k

Fragment:
eseutil /ms

Defragment:
eseutil /d